Merge "AdminUtils NSX|V: router recreate fix type check"

This commit is contained in:
Jenkins 2017-07-02 11:29:42 +00:00 committed by Gerrit Code Review
commit 26e47bb67d

View File

@ -104,12 +104,12 @@ def nsx_recreate_router_edge(resource, event, trigger, **kwargs):
# all the routers on the same edge have the same type, so it # all the routers on the same edge have the same type, so it
# is ok to check the type once # is ok to check the type once
example_router = plugin.get_router(context, router_ids[0]) example_router = plugin.get_router(context, router_ids[0])
router_driver = plugin._router_managers.get_tenant_router_driver( if example_router.get('distributed'):
context, example_router['router_type'])
if router_driver.get_type() == "distributed":
LOG.error("Recreating a distributed driver edge is not " LOG.error("Recreating a distributed driver edge is not "
"supported") "supported")
return return
router_driver = plugin._router_managers.get_tenant_router_driver(
context, example_router['router_type'])
# load all the routers before deleting their binding # load all the routers before deleting their binding
routers = [] routers = []