From 34aa474e95b4b0327f20911395519517407a2d04 Mon Sep 17 00:00:00 2001 From: Brad Hall Date: Mon, 12 Dec 2011 18:24:26 +0000 Subject: [PATCH] Fix for bug 902175 Remove the gateway port when deleting the network (if it's the only one left), and kill dnsmasq if the network is deleted. Change-Id: If6b4798ddb4d21fe6c32ac20e6237494b799ecbd --- nova/tests/test_quantum.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nova/tests/test_quantum.py b/nova/tests/test_quantum.py index 174c512d..37a3ea46 100644 --- a/nova/tests/test_quantum.py +++ b/nova/tests/test_quantum.py @@ -104,6 +104,15 @@ class FakeQuantumClientConnection(object): return port_id return None + def get_attached_ports(self, tenant_id, net_id): + ports = [] + for nid, n in self.nets.items(): + if nid == net_id and n['tenant-id'] == tenant_id: + for port_id, p in n['ports'].items(): + ports.append({'port-id': port_id, + 'attachment': p['attachment-id']}) + return ports + def get_networks(self, tenant_id): nets = [] for nid, n in self.nets.items():