From b4a0f659f678d80d562de9f57b2112a018fd4d45 Mon Sep 17 00:00:00 2001 From: gongysh Date: Thu, 15 Nov 2012 23:50:22 +0800 Subject: [PATCH] Revert "Put gw_port into router dict result." This reverts commit c1c19b11792e8e220b11466051739ea5b4279a7a. Bug #1079206 Change-Id: Ia5fd84470779846749c00bb7dae7198055388347 --- quantum/db/l3_db.py | 3 +-- quantum/tests/unit/test_l3_plugin.py | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/quantum/db/l3_db.py b/quantum/db/l3_db.py index f448a68e5..e192a59e3 100644 --- a/quantum/db/l3_db.py +++ b/quantum/db/l3_db.py @@ -129,8 +129,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): 'external_gateway_info': None} if router['gw_port_id']: nw_id = router.gw_port['network_id'] - res['external_gateway_info'] = {'network_id': nw_id, - 'gw_port': router.gw_port} + res['external_gateway_info'] = {'network_id': nw_id} return self._fields(res, fields) def create_router(self, context, router): diff --git a/quantum/tests/unit/test_l3_plugin.py b/quantum/tests/unit/test_l3_plugin.py index 0b00b1b78..99710b40b 100644 --- a/quantum/tests/unit/test_l3_plugin.py +++ b/quantum/tests/unit/test_l3_plugin.py @@ -656,10 +656,7 @@ class L3NatDBTestCase(test_db_plugin.QuantumDbPluginV2TestCase): s['subnet']['network_id']) body = self._show('routers', r['router']['id']) net_id = body['router']['external_gateway_info']['network_id'] - gw_port = body['router']['external_gateway_info']['gw_port'] - port_netid = gw_port['network_id'] self.assertEquals(net_id, s['subnet']['network_id']) - self.assertEquals(net_id, port_netid) self._remove_external_gateway_from_router( r['router']['id'], s['subnet']['network_id']) -- 2.45.2