Merge "remove NetworkDuplicated exception"

This commit is contained in:
Jenkins 2017-01-28 00:53:32 +00:00 committed by Gerrit Code Review
commit ed55f6b2c9
4 changed files with 0 additions and 18 deletions

View File

@ -117,7 +117,6 @@ class InterfaceAttachmentController(wsgi.Controller):
vif = self.compute_api.attach_interface(context,
instance, network_id, port_id, req_ip)
except (exception.InterfaceAttachFailedNoNetwork,
exception.NetworkDuplicated,
exception.NetworkAmbiguous,
exception.NoMoreFixedIps,
exception.PortNotUsable,

View File

@ -673,7 +673,6 @@ class ServersController(wsgi.Controller):
exception.PortRequiresFixedIP,
exception.NetworkRequiresSubnet,
exception.NetworkNotFound,
exception.NetworkDuplicated,
exception.InvalidBDM,
exception.InvalidBDMSnapshot,
exception.InvalidBDMVolume,

View File

@ -647,10 +647,6 @@ class InstanceMappingNotFound(NotFound):
msg_fmt = _("Instance %(uuid)s has no mapping to a cell.")
class NetworkDuplicated(Invalid):
msg_fmt = _("Network %(network_id)s is duplicated.")
class NetworkDhcpReleaseFailed(NovaException):
msg_fmt = _("Failed to release IP %(address)s with MAC %(mac_address)s")

View File

@ -3279,18 +3279,6 @@ class ServersControllerCreateTest(test.TestCase):
self.assertRaises(webob.exc.HTTPBadRequest,
self._test_create_extra, params)
def test_create_instance_with_neturonv2_network_duplicated(self):
network = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'
requested_networks = [{'uuid': network}, {'uuid': network}]
params = {'networks': requested_networks}
def fake_create(*args, **kwargs):
raise exception.NetworkDuplicated(network_id=network)
self.stubs.Set(compute_api.API, 'create', fake_create)
self.assertRaises(webob.exc.HTTPBadRequest,
self._test_create_extra, params)
def test_create_instance_with_neutronv2_port_not_found(self):
network = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'
port = 'eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee'