remove NetworkDuplicated exception

b06867c581 removed check and said:
Removed neutron.allow_duplicate_networks config option. The
behavior in Liberty is now to simply allow duplicate
networks. so we don't need to catch this exception anymore.

Change-Id: I4c39436d5481bd019f63b4d8c09ad055e9b217d0
This commit is contained in:
jichenjc 2016-11-28 01:21:46 +08:00
parent 6c5824d72f
commit 243c08c130
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

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

View File

@ -655,10 +655,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

@ -3204,18 +3204,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'