Changeset 164
- Timestamp:
- 09/24/08 17:08:28 (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGES
r161 r164 1 1 =========== 2.9.8 2 - pbs_python.spec file patch added libdir and python defines so it will3 build for RHEL5.1/CentOS 5.12 - pbs_python.spec file patch added libdir and python defines so it 3 will build for RHEL5.1/CentOS 5.1 4 4 by : Michael Sternberg <sternberg add anl dot gov> 5 5 applied by: Bas van der Vlies … … 17 17 Added by: Bas van der Vlies 18 18 19 - We now have proper destructors (free memory) in SWIG for attrl and attropl 20 attributes. 19 - We now have proper destructors (free memory) in SWIG for attrl and 20 attropl attributes. 21 Added by: Bas van der Vlies 22 23 - PBSQuery 24 * Added getnodes_with_property() function. This will get all nodes with 25 a certain property, eg: 26 - get all nodes with property 'cores8' and return all attributes: 27 getnodes_with_property('cores8') 28 29 - get all nodes with property 'cores2' and omly return the 30 attributes 'state' and 'properties': 31 attrl = [ 'state', 'properties' ] 32 getnodes_with_property('cores2', attrl) 21 33 Added by: Bas van der Vlies 22 34 -
trunk/src/PBSQuery.py
r161 r164 169 169 return self.d 170 170 171 def _statnode(self, node_name='', attrib_list=None):171 def _statnode(self, select='', attrib_list=None, property=None): 172 172 """Get the node config from the pbs server""" 173 173 if attrib_list: … … 176 176 self.attribs = 'NULL' 177 177 178 if property: 179 select = ':%s' %(property) 180 178 181 self._connect() 179 nodes = pbs.pbs_statnode(self.con, node_name, self.attribs, 'NULL')182 nodes = pbs.pbs_statnode(self.con, select, self.attribs, 'NULL') 180 183 self._disconnect() 181 184 … … 189 192 def getnodes(self, attrib_list=None): 190 193 self._statnode('', attrib_list) 194 return self.d 195 196 def getnodes_with_property(self, property, attrib_list=None): 197 self._statnode('', attrib_list, property) 191 198 return self.d 192 199
Note: See TracChangeset
for help on using the changeset viewer.