#NEWLINE# def test_process_create( self ) : #NEWLINE# #INDENT# display_name = 'display_name' #NEWLINE# glance_image_id = '5aea309f-9638-44de-827d-5125ff7e4689' #NEWLINE# nova_flavor_id = '3' #NEWLINE# nova_keypair_id = 'test' #NEWLINE# neutron_securitygroup_ids = [ '947dc616-e737-4cb9-b816-52ad80cb9e37' , '1892987f-3874-46ef-a487-fb8e925210ce' ] #NEWLINE# neutron_network_ids = [ 'a3c6488a-a236-46f7-aab6-8f1fe91ad9ef' , '43015163-babe-4bee-8fe8-38470d28b2a2' ] #NEWLINE# metadata = { #NEWLINE# #INDENT# 'metadata' : 'metadata' , #NEWLINE# #UNINDENT# } #NEWLINE# userdata = 'userdata' #NEWLINE# process_build = fake_process ( ) #NEWLINE# process_build . status = 'BUILD' #NEWLINE# process_build . id = self . process_id #NEWLINE# nics = [ ] #NEWLINE# for network_id in neutron_network_ids : #NEWLINE# #INDENT# nics . append ( network_id ) #NEWLINE# #UNINDENT# self . nova . servers . create ( name = display_name , image = glance_image_id , flavor = nova_flavor_id , meta = metadata , userdata = userdata , nics = nics , key_name = nova_keypair_id , security_groups = neutron_securitygroup_ids ) . AndReturn ( process_build ) #NEWLINE# process_active = fake_process ( ) #NEWLINE# process_active . status = 'ACTIVE' #NEWLINE# process_active . id = self . process_id #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# process_id = self . process_client . process_create ( display_name , nova_keypair_id , neutron_securitygroup_ids , glance_image_id , nova_flavor_id , userdata , metadata , neutron_network_ids ) #NEWLINE# self . assertEqual ( process_id , ( self . process_id , 'BUILD' ) )