#NEWLINE# def get_test_instance( context = None ) : #NEWLINE# #INDENT# if ( not context ) : #NEWLINE# #INDENT# context = get_test_admin_context ( ) #NEWLINE# #UNINDENT# test_instance = { #NEWLINE# #INDENT# 'memory_kb' : '1024000' , #NEWLINE# 'basepath' : '/some/path' , #NEWLINE# 'bridge_name' : 'br100' , #NEWLINE# 'vcpus' : 2 , #NEWLINE# 'project_id' : 'fake' , #NEWLINE# 'bridge' : 'br101' , #NEWLINE# 'image_ref' : '1' , #NEWLINE# 'instance_type_id' : '5' , #NEWLINE# #UNINDENT# } #NEWLINE# instance_ref = nova . db . instance_create ( context , test_instance ) #NEWLINE# return instance_ref