From: Aaron Rosen Date: Wed, 27 Feb 2013 23:00:41 +0000 (-0800) Subject: fix update_port to get tenant_id from db rather than request X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8d05d88923984d68fff49e39259a54d4a0f3343f;p=openstack-build%2Fneutron-build.git fix update_port to get tenant_id from db rather than request This patch changes the behavor of nvp's update_port() to how it previously worked by retrieving the value from the db and not the request. Fixes bug 1138330 Change-Id: I49682db392954b3cfaeb4ad4b8acf95113dcae7e --- diff --git a/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py b/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py index 8fb8aee19..a20be4d53 100644 --- a/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py +++ b/quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py @@ -1358,7 +1358,6 @@ 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['port']) delete_security_groups = self._check_update_deletes_security_groups( port) has_security_groups = self._check_update_has_security_groups(port) @@ -1368,7 +1367,7 @@ class NvpPluginV2(db_base_plugin_v2.QuantumDbPluginV2, context, id, port) # copy values over ret_port.update(port['port']) - + tenant_id = self._get_tenant_id_for_create(context, ret_port) # populate port_security setting if psec.PORTSECURITY not in port['port']: ret_port[psec.PORTSECURITY] = self._get_port_security_binding(