]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Implementing Dan's suggestion concerning fixing the bug in db api rather than FakePlugin
authorSalvatore Orlando <salvatore.orlando@eu.citrix.com>
Wed, 7 Sep 2011 10:21:56 +0000 (11:21 +0100)
committerSalvatore Orlando <salvatore.orlando@eu.citrix.com>
Wed, 7 Sep 2011 10:21:56 +0000 (11:21 +0100)
quantum/db/api.py
quantum/plugins/SamplePlugin.py

index 89fd05891437d193acf0356a56047e4cc0bd76c8..9ff738d2a8b19a40b9e3a29ff9409c2551ecb292 100644 (file)
@@ -170,6 +170,8 @@ def port_create(net_id, state=None):
 
 
 def port_list(net_id):
+    # confirm network exists
+    network_get(net_id)
     session = get_session()
     return session.query(models.Port).\
       filter_by(network_id=net_id).\
index c45a76616f0a4221c4f7b9f31146b51230a11021..af75083daa000775b53b0f91706a9f91a7be795a 100644 (file)
@@ -238,7 +238,6 @@ class FakePlugin(object):
         specified Virtual Network.
         """
         LOG.debug("FakePlugin.get_all_ports() called")
-        self._get_network(tenant_id, net_id)
         port_ids = []
         ports = db.port_list(net_id)
         for x in ports: