]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Need to pass port['port'] to _get_tenant_id_for_create()
authorAaron Rosen <arosen@nicira.com>
Mon, 18 Feb 2013 02:49:40 +0000 (18:49 -0800)
committerAaron Rosen <arosen@nicira.com>
Mon, 18 Feb 2013 02:59:35 +0000 (18:59 -0800)
This change set I9ac44a8e moved this logic out of the transaction
which caused this bug. Unit tests did not catch this because
this error is caused on NVP since the tenant_id is passed in as a tag
and this change resulted in the tenant_id becoming None which is not
an allowed tag value. Will improve error handling and edge cases like
this to fake_nvpapiclient in different commit.

Change-Id: Ib0eaab1f389de98b335f58e9215981adbbf9e2ef

quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py

index a8e2de004c283ee7f15d9e4e30405835d575265c..2a9c742d0be8a943cdb14e33b39884546558425f 100644 (file)
@@ -1161,7 +1161,7 @@ class NvpPluginV2(db_base_plugin_v2.QuantumDbPluginV2,
         if attr.is_attr_set(port['port'].get(psec.PORTSECURITY)):
             self._enforce_set_auth(context, port,
                                    self.port_security_enabled_update)
-        tenant_id = self._get_tenant_id_for_create(context, port)
+        tenant_id = self._get_tenant_id_for_create(context, port['port'])
         delete_security_groups = self._check_update_deletes_security_groups(
             port)
         has_security_groups = self._check_update_has_security_groups(port)