From: Aaron Rosen Date: Tue, 28 May 2013 19:49:20 +0000 (-0700) Subject: Fix update_port() so that it's done within the transaction X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2871d329eb66b2da7eade94285d6fc39325e467f;p=openstack-build%2Fneutron-build.git Fix update_port() so that it's done within the transaction Fixes bug 1185152 Change-Id: I192991650a3562c73af550ec2288d1285412825c --- diff --git a/quantum/db/db_base_plugin_v2.py b/quantum/db/db_base_plugin_v2.py index 5a2f15255..f7283cd32 100644 --- a/quantum/db/db_base_plugin_v2.py +++ b/quantum/db/db_base_plugin_v2.py @@ -1379,9 +1379,9 @@ class QuantumDbPluginV2(quantum_plugin_base_v2.QuantumPluginBaseV2): ip_address=ip['ip_address'], subnet_id=ip['subnet_id'], expiration=self._default_allocation_expiration()) context.session.add(allocated) - # Remove all attributes in p which are not in the port DB model - # and then update the port - port.update(self._filter_non_model_columns(p, models_v2.Port)) + # Remove all attributes in p which are not in the port DB model + # and then update the port + port.update(self._filter_non_model_columns(p, models_v2.Port)) return self._make_port_dict(port)