#NEWLINE# def test_delete_network_profile_with_network( self ) : #NEWLINE# #INDENT# 'Test a network profile delete when its network is around.' #NEWLINE# data = self . get_test_network_profile_dict ( segment_type = 'vlan' ) #NEWLINE# net_profile = self . create_assert_network_profile_success ( data ) #NEWLINE# net_prof_id = net_profile [ 'network_profile' ] [ 'id' ] #NEWLINE# net_res = self . _create_network ( self . fmt , name = 'vlan-net' , admin_state_up = True , arg_list = ( 'n1kv:profile' , ) , set_context = True , ** { #NEWLINE# #INDENT# n1kv_const . N1KV_PROFILE : net_prof_id , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( webob . exc . HTTPCreated . code , net_res . status_int ) #NEWLINE# net_prof_req = self . new_delete_request ( 'network_profiles' , net_profile [ 'network_profile' ] [ 'id' ] ) #NEWLINE# net_prof_res = net_prof_req . get_response ( self . ext_api ) #NEWLINE# self . assertEqual ( webob . exc . HTTPConflict . code , net_prof_res . status_int )