From 9d1adec5a79b88df0533eee3957679791207183e Mon Sep 17 00:00:00 2001 From: linb Date: Mon, 26 Jan 2015 14:11:25 +0800 Subject: [PATCH] fix shared-router/metadata patch merge codes bug Metadata patch use get_nsxv_router_binding_by_edge which is replaced by get_nsxv_router_bindings_by_edge of shared-router patch. The patch recovers get_nsxv_router_binding_by_edge func. Change-Id: I91ccce3d5b248bbb777512f7c74e2c94d0cc2bdf --- vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py b/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py index 189e3dc104..dd678c838e 100644 --- a/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py +++ b/vmware_nsx/neutron/plugins/vmware/dbexts/nsxv_db.py @@ -53,9 +53,8 @@ def get_nsxv_router_binding(session, router_id): def get_nsxv_router_binding_by_edge(session, edge_id): - with session.begin(subtransactions=True): - return (session.query(nsxv_models.NsxvRouterBinding). - filter_by(edge_id=edge_id).first()) + return (session.query(nsxv_models.NsxvRouterBinding). + filter_by(edge_id=edge_id).first()) def get_nsxv_router_bindings(session):