Changeset 191
- Timestamp:
- 05/14/09 13:47:18 (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGES
r189 r191 36 36 37 37 Author: Bas van der Vlies 38 39 - Added iter object for job, node, queue and server objects, eg: 40 node = p.getnode('gb-r1n1') 41 print node.name 42 for attrib in node: 43 print '%\t%s = %s' %(attrib, node[attrib]) 44 Author: Bas van der Vlies 45 46 - fixed an error in getnode, getqueue and getjob, return empty 47 dictionary if not found 48 Author: Bas van der Vlies 38 49 39 50 - New build system for rpm packages, make -f Makefile.rpm 40 51 Author: Michel Jouvin <jouvin add lal dot in2p3 dot fr> 41 Applied: Bas van der Vlies 52 53 Applied: Bas van der Vlies 42 54 43 55 =========== 3.0.1 -
trunk/debian/changelog
r189 r191 3 3 * PBSQuery: 4 4 New data structure. In the old structure it is a dictionary 5 with a value and the value is a string. This is changed that 5 with a value and the value is a string. This is changed that 6 6 dictionary values are now of type list or dictionary depends 7 7 on the value of keyword, eg for a node: 8 - np = 2: 9 - node['np'] = [ '2' ] 8 - np = 2: 9 - node['np'] = [ '2' ] 10 10 - properties = cores2, mem4gb, parallel 11 - node['properties'] = [ 'cores2', 'mem4gb', 'parallel' ] 12 - status = arch=x86_64,sessions=22599,,size=70627864kb, ... 13 - node['status']['arch'] = [ 'x86_64' ] 11 - node['properties'] = [ 'cores2', 'mem4gb', 'parallel' ] 12 - status = arch=x86_64,sessions=22599,,size=70627864kb, ... 13 - node['status']['arch'] = [ 'x86_64' ] 14 14 - node['status']['sessions'] = [ '222599' ] 15 15 - ... … … 21 21 example: 22 22 p = PBSQuery() 23 p.new_data_structure() 23 p.new_data_structure() 24 24 25 25 nodes = p.getnodes() … … 28 28 Author: Bas van der Vlies 29 29 30 * PBSQuery 31 For old and new data structure we now can use another syntax: 32 - node['np'] and node.np are equivalent 33 34 This new syntax works for all keywords. 35 Author: Bas van der Vlies 36 37 -- Bas van der Vlies <basv@sara.nl> Wed, 13 May 2009 16:20:27 +0200 30 * PBSQuery: 31 For old and new data structure we now can use another syntax: 32 - node['np'] and node.np are equivalent 33 34 This new syntax works for all keywords. 35 Author: Bas van der Vlies 36 37 * PBSQuery: 38 Added iter object for job, node, queue and server objects, eg: 39 node = p.getnode('gb-r1n1') 40 print node.name 41 for attrib in node: 42 print '%\t%s = %s' %(attrib, node[attrib]) 43 Author: Bas van der Vlies 44 45 * PBSQuery: 46 fixed an error in getnode, getqueue and getjob, return 47 empty dictionary if not found. 48 Author: Bas van der Vlies 49 50 * PBSQuery: 51 New build system for rpm packages, make -f Makefile.rpm 52 Author: Michel Jouvin <jouvin add lal dot in2p3 dot fr> 53 Applied: Bas van der Vlies 54 55 -- Bas van der Vlies <bas@rc.sara.nl> Thu, 14 May 2009 13:41:00 +0200 38 56 39 57 pbs-python (3.0.1-2) intrepid; urgency=low -
trunk/src/PBSQuery.py
r190 r191 227 227 def getqueue(self, name, attrib_list=None): 228 228 self._statqueue(name, attrib_list) 229 return self.d[name] 229 try: 230 return self.d[name] 231 except KeyError, detail: 232 return self.d 230 233 231 234 def getqueues(self, attrib_list=None): … … 251 254 def getnode(self, name, attrib_list=None): 252 255 self._statnode(name, attrib_list) 253 return self.d[name] 256 try: 257 return self.d[name] 258 except KeyError, detail: 259 return self.d 254 260 255 261 def getnodes(self, attrib_list=None): … … 280 286 281 287 self._statjob(name, attrib_list) 282 return self.d[name] 288 try: 289 return self.d[name] 290 except KeyError, detail: 291 return self.d 283 292 284 293 def getjobs(self, attrib_list=None):
Note: See TracChangeset
for help on using the changeset viewer.