diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-03-12 19:27:30 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-03-12 19:27:30 +0000 |
| commit | 43b95ca29ec5ad318c771d03d151a9425e138cec (patch) | |
| tree | ed7bf6e32ab11f3e30e6044e14abfbc85c4f28ba | |
| parent | 4214fea02f65ccb66d34ba2a9af454c7491f1349 (diff) | |
| parent | ec6be8e59e7021939c8a04d64be1c13403291d67 (diff) | |
Merge "Bug #922356 QuantumManager does not initiate unplug on the linux_net driver"
| -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) |
