Changeset 164 for trunk/src


Ignore:
Timestamp:
09/24/08 17:08:28 (16 years ago)
Author:
bas
Message:

src/PBSQuery.py:

  • added a new function getnodes_with_property() for torque > 2.1.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PBSQuery.py

    r161 r164  
    169169                return self.d
    170170
    171         def _statnode(self, node_name='', attrib_list=None):
     171        def _statnode(self, select='', attrib_list=None, property=None):
    172172                """Get the node config from the pbs server"""
    173173                if attrib_list:
     
    176176                        self.attribs = 'NULL'
    177177                       
     178                if property:
     179                        select = ':%s' %(property)
     180
    178181                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')
    180183                self._disconnect()
    181184               
     
    189192        def getnodes(self, attrib_list=None):
    190193                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)
    191198                return self.d
    192199
Note: See TracChangeset for help on using the changeset viewer.