@@ -28,8 +28,10 @@ class VirtualMachine(PoolElement):
2828 SUSPENDED = 5
2929 DONE = 6
3030 FAILED = 7
31+ POWEROFF = 8
32+ UNDEPLOYED = 9
3133 VM_STATE = ['INIT' , 'PENDING' , 'HOLD' , 'ACTIVE' , 'STOPPED' ,
32- 'SUSPENDED' , 'DONE' , 'FAILED' ]
34+ 'SUSPENDED' , 'DONE' , 'FAILED' , 'POWEROFF' , 'UNDEPLOYED' ]
3335
3436 SHORT_VM_STATES = {
3537 'INIT' : 'init' ,
@@ -39,7 +41,9 @@ class VirtualMachine(PoolElement):
3941 'STOPPED' : 'stop' ,
4042 'SUSPENDED' : 'susp' ,
4143 'DONE' : 'done' ,
42- 'FAILED' : 'fail'
44+ 'FAILED' : 'fail' ,
45+ 'POWEROFF' : 'poff' ,
46+ 'UNDEPLOYED' : 'udep'
4347 }
4448
4549
@@ -329,15 +333,15 @@ def str_state(self):
329333 '''
330334 String representation of virtual machine state.
331335 One of: INIT, PENDING, HOLD, ACTIVE, STOPPED, SUSPENDED,
332- DONE, FAILED
336+ DONE, FAILED, POWEROFF, UNDEPLOYED
333337 '''
334338 return self .VM_STATE [int (self .state )]
335339
336340 @property
337341 def short_state (self ):
338342 '''
339343 Short string representation of virtual machine state.
340- One of: init, pend, hold, actv, stop, susp, done, fail
344+ One of: init, pend, hold, actv, stop, susp, done, fail, poff, udep
341345 '''
342346 return self .SHORT_VM_STATES [self .str_state ]
343347
@@ -411,6 +415,8 @@ def info(self, filter=-3, range_start=-1, range_end=-1, vm_state=-1):
411415 * 5 SUSPENDED
412416 * 6 DONE
413417 * 7 FAILED
418+ * 8 POWEROFF
419+ * 9 UNDEPLYED
414420
415421 '''
416422 super (VirtualMachinePool , self ).info (filter , range_start ,
0 commit comments