summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2011-12-13 18:05:39 +0000
committerGerrit Code Review <review@openstack.org>2011-12-13 18:05:39 +0000
commitf597dc5548d66530e68ff5809ac2c56b7edbc6d8 (patch)
treeffb337b77125315f92e461c3b0ff0545f36fa6fc /nova/tests
parentc9796562a2a25917bc91f7b3cb63c01b2034127b (diff)
parent724e5e7a5bc065be239b3ededf0609de386c1d6f (diff)
Merge "Fix for bug 902175"
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_quantum.py9
1 files changed, 9 insertions, 0 deletions
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():