Merge "[cleanup][network-wrapper] Handle auto-removed ports"

This commit is contained in:
Jenkins 2017-05-30 06:00:21 +00:00 committed by Gerrit Code Review
commit 8bd5ff7d53

View File

@ -264,7 +264,11 @@ class NeutronWrapper(NetworkWrapper):
self.client.remove_interface_router( self.client.remove_interface_router(
port["device_id"], {"port_id": port["id"]}) port["device_id"], {"port_id": port["id"]})
else: else:
self.client.delete_port(port["id"]) try:
self.client.delete_port(port["id"])
except neutron_exceptions.PortNotFoundClient:
# port is auto-removed
pass
for subnet_id in network["subnets"]: for subnet_id in network["subnets"]:
self._delete_subnet(subnet_id) self._delete_subnet(subnet_id)