Merge "Revert "Put gw_port into router dict result.""

This commit is contained in:
Jenkins 2012-11-15 17:51:49 +00:00 committed by Gerrit Code Review
commit 719e67b633
2 changed files with 1 additions and 5 deletions

View File

@ -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):

View File

@ -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'])