Add remove_gateway_router before delete_router

To prevent error during cleanup, the router gateway should be cleared
before deleting the router.

Change-Id: I8fe416b7707636c84aa26b6610c13233e2b0ecc6
This commit is contained in:
John Wu 2015-06-18 11:00:21 -07:00
parent 537a157059
commit c264b34077

View File

@ -330,6 +330,8 @@ class Network(object):
if self.ext_router_created:
try:
if self.ext_router['name'] == self.ext_router_name:
self.neutron_client.remove_gateway_router(
self.ext_router['id'])
self.neutron_client.delete_router(self.ext_router['id'])
print 'External router %s deleted' % \
(self.ext_router['name'])