#NEWLINE# @ staticmethod #NEWLINE# def __process_updated_vms( updated_vms ) : #NEWLINE# #INDENT# simple_actions = dict ( ) #NEWLINE# for vm in VM . objects . all ( ) : #NEWLINE# #INDENT# if ( vm . getUUID ( ) in updated_vms . keys ( ) ) : #NEWLINE# #INDENT# vm . setState ( 'running' ) #NEWLINE# vm . save ( ) #NEWLINE# simple_actions [ vm . getUUID ( ) ] = 'running' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( vm . getState ( ) in [ 'deleting...' , 'failed' , 'on queue' , 'unknown' , 'undefined' ] ) : #NEWLINE# #INDENT# InformationDispatcher . force_delete_vm ( vm ) #NEWLINE# simple_actions [ vm . getUUID ( ) ] = 'deleted' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( vm . getState ( ) in [ 'running' , 'starting...' , 'stopping...' ] ) : #NEWLINE# #INDENT# vm . setState ( 'stopped' ) #NEWLINE# vm . save ( ) #NEWLINE# simple_actions [ vm . getUUID ( ) ] = 'stopped' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return updated_vms