From: Aaron Rosen Date: Mon, 18 Feb 2013 02:49:40 +0000 (-0800) Subject: Need to pass port['port'] to _get_tenant_id_for_create() X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=244339d8a961d2360417c5c319d87d6c75d78357;p=openstack-build%2Fneutron-build.git Need to pass port['port'] to _get_tenant_id_for_create() 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 --- diff --git a/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py b/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py index a8e2de004..2a9c742d0 100644 --- a/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py +++ b/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py @@ -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)