Delete router routes before router delete in unittest teardown

Closes bug: #1556882

Change-Id: I1d777a774e80650cbb137b4e083a5fcc299a01e8
This commit is contained in:
Bob Melander 2016-03-14 12:43:37 +01:00
parent fb393576d0
commit 4efdcb2ece
1 changed files with 4 additions and 0 deletions

View File

@ -195,6 +195,10 @@ class RoutertypeTestCaseMixin(object):
for r in routers:
if r['id'] in auto_deleted_router_ids:
continue
# Remove any static routes
if r.get('routes'):
self._update('routers', r['id'],
{'router': {'routes': None}})
# Remove any floatingips using the router
for fip in self._list(
'floatingips',