From 724e5e7a5bc065be239b3ededf0609de386c1d6f Mon Sep 17 00:00:00 2001 From: Brad Hall Date: Mon, 12 Dec 2011 18:24:26 +0000 Subject: 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(+) (limited to 'nova/tests') diff --git a/nova/tests/test_quantum.py b/nova/tests/test_quantum.py index 174c512db..37a3ea465 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(): -- cgit