]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Pass newly created router to _update_router_gw_info
authorEugene Nikanorov <enikanorov@mirantis.com>
Fri, 20 Jun 2014 08:04:41 +0000 (12:04 +0400)
committerEugene Nikanorov <enikanorov@mirantis.com>
Tue, 24 Jun 2014 20:08:41 +0000 (00:08 +0400)
pass it to _update_router_gw_info as last parameter to save
retrieving it again from the session.

Change-Id: I7fbbd675839c2874578c62dfed390d86e3b4801a

neutron/db/l3_db.py

index 5d2aa6e1aaf038c4a4276cfbbe2691618dac80e6..cad9e48153dae86ec58ade3f1657b881f4b8845b 100644 (file)
@@ -145,7 +145,8 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
         with context.session.begin(subtransactions=True):
             router_db = self._create_router_db(context, r, tenant_id, gw_info)
             if gw_info:
-                self._update_router_gw_info(context, router_db['id'], gw_info)
+                self._update_router_gw_info(context, router_db['id'],
+                                            gw_info, router=router_db)
         return self._make_router_dict(router_db)
 
     def _update_router_db(self, context, router_id, data, gw_info):