#NEWLINE# def _start_instances( self , reservation ) : #NEWLINE# #INDENT# ' Start the instances, harmless if not already running. ' #NEWLINE# self . log ( 'starting instance' ) #NEWLINE# instance_ids = [ x . id for x in reservation . instances ] #NEWLINE# self . connection . start_instances ( instance_ids , dry_run = False ) #NEWLINE# self . log ( ( 'waiting for instance to start: %s (waiting 10 seconds...)' % instance_ids ) ) #NEWLINE# while True : #NEWLINE# #INDENT# time . sleep ( 10 ) #NEWLINE# reservations = self . connection . get_all_instances ( instance_ids = instance_ids ) #NEWLINE# for reservation in reservations : #NEWLINE# #INDENT# for instance in reservation . instances : #NEWLINE# #INDENT# if ( instance . state == 'running' ) : #NEWLINE# #INDENT# self . log ( 'instance has started' ) #NEWLINE# return