예제 #1
0
 def test_network_neutron_disassociate_host_not_implemented(self):
     uuid = FAKE_NETWORKS[1]['uuid']
     self.flags(network_api_class='nova.network.neutronv2.api.API')
     assoc_ctrl = networks_associate.NetworkAssociateActionController()
     self.assertRaises(webob.exc.HTTPNotImplemented,
                       assoc_ctrl._disassociate_host_only, self.req, uuid,
                       {'disassociate_host': None})
예제 #2
0
 def test_network_neutron_disassociate_host_not_implemented(self):
     uuid = FAKE_NETWORKS[1]['uuid']
     self.flags(network_api_class='nova.network.neutronv2.api.API')
     assoc_ctrl = networks_associate.NetworkAssociateActionController()
     req = fakes.HTTPRequest.blank('/v2/1234/os-networks/%s/action' % uuid)
     self.assertRaises(webob.exc.HTTPNotImplemented,
                       assoc_ctrl._disassociate_host_only, req, uuid,
                       {'disassociate_host': None})
예제 #3
0
 def _setup(self):
     ext_mgr = extensions.ExtensionManager()
     ext_mgr.extensions = {'os-extended-networks': 'fake'}
     self.controller = networks.NetworkController(self.fake_network_api,
                                                  ext_mgr)
     self.associate_controller = networks_associate\
         .NetworkAssociateActionController(self.fake_network_api)
     self.neutron_assoc_ctrl = (
         networks_associate.NetworkAssociateActionController(
             neutron.API(skip_policy_check=False)))
예제 #4
0
 def _setup(self):
     ext_mgr = extensions.ExtensionManager()
     ext_mgr.extensions = {'os-extended-networks': 'fake'}
     self.controller = networks.NetworkController(self.fake_network_api,
                                                  ext_mgr)
     self.associate_controller = networks_associate\
         .NetworkAssociateActionController(self.fake_network_api)
     self.neutron_assoc_ctrl = (
         networks_associate.NetworkAssociateActionController(
             neutron.API(skip_policy_check=False)))
     self.req = fakes.HTTPRequest.blank('', use_admin_context=True)
     self.non_admin_req = fakes.HTTPRequest.blank('')