From b77246b844312e31258c6e30f1b99d29607f3489 Mon Sep 17 00:00:00 2001 From: Aaron Rosen Date: Sun, 17 Feb 2013 18:49:40 -0800 Subject: [PATCH] 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 --- quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py b/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py index a8e2de004c..2a9c742d0b 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)