diff options
| author | Sumit Naiksatam <snaiksat@cisco.com> | 2012-03-09 21:02:22 -0800 |
|---|---|---|
| committer | Sumit Naiksatam <snaiksat@cisco.com> | 2012-03-09 21:08:07 -0800 |
| commit | ec6be8e59e7021939c8a04d64be1c13403291d67 (patch) | |
| tree | cd7b2f1eb933c450f18a187973de357e1e2e3657 /nova | |
| parent | ac557d5778089d4f83160901039db3b1c766dc78 (diff) | |
| download | nova-ec6be8e59e7021939c8a04d64be1c13403291d67.tar.gz nova-ec6be8e59e7021939c8a04d64be1c13403291d67.tar.xz nova-ec6be8e59e7021939c8a04d64be1c13403291d67.zip | |
Bug #922356 QuantumManager does not initiate unplug on the linux_net driver
remove_gateway() being added to L3 driver API which gets invoked from
QuantumManager when a network is deleted. remove_gateway()
implementation for LinuxNetL3 calls unplug on the linux_net driver.
Change-Id: I42d12cf8653c61436e89e97eaa384f26ee2ed707
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/network/l3.py | 10 | ||||
| -rw-r--r-- | nova/network/quantum/manager.py | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/nova/network/l3.py b/nova/network/l3.py index 487b07311..4603bdf90 100644 --- a/nova/network/l3.py +++ b/nova/network/l3.py @@ -45,6 +45,10 @@ class L3Driver(object): """Set up a gateway on this network""" raise NotImplementedError() + def remove_gateway(self, network_ref): + """Remove an existing gateway on this network""" + raise NotImplementedError() + def is_initialized(self): """:returns: True/False (whether the driver is initialized)""" raise NotImplementedError() @@ -94,6 +98,9 @@ class LinuxNetL3(L3Driver): gateway=(network_ref['gateway'] is not None)) linux_net.initialize_gateway_device(dev, network_ref) + def remove_gateway(self, network_ref): + linux_net.unplug(network_ref) + def add_floating_ip(self, floating_ip, fixed_ip, l3_interface_id): linux_net.bind_floating_ip(floating_ip, l3_interface_id) linux_net.ensure_floating_forward(floating_ip, fixed_ip) @@ -133,6 +140,9 @@ class NullL3(L3Driver): def initialize_gateway(self, network_ref): pass + def remove_gateway(self, network_ref): + pass + def add_floating_ip(self, floating_ip, fixed_ip, l3_interface_id): pass diff --git a/nova/network/quantum/manager.py b/nova/network/quantum/manager.py index 16e782fa8..eb0f389f7 100644 --- a/nova/network/quantum/manager.py +++ b/nova/network/quantum/manager.py @@ -258,6 +258,7 @@ class QuantumManager(manager.FloatingIP, manager.FlatManager): self.q_conn.detach_and_delete_port(q_tenant_id, net_uuid, gw_port_uuid) + self.l3driver.remove_gateway(net_ref) # Now we can delete the network self.q_conn.delete_network(q_tenant_id, net_uuid) |
