#NEWLINE# def check_vm_state( self , srv_id ) : #NEWLINE# #INDENT# srv = self . novaclient . servers . get ( srv_id ) #NEWLINE# if ( srv . status == 'ERROR' ) : #NEWLINE# #INDENT# msg = 'VM with id {0} was spawned in error state' #NEWLINE# raise RuntimeError ( msg . format ( srv_id ) ) #NEWLINE# #UNINDENT# return ( srv_id . status == 'ACTIVE' )