NSX|P: Support router standby relocation

Using the passthrough api

Change-Id: I2f8b9e219b3162bc82889f5459342e9f9d9b1878
This commit is contained in:
Adit Sarfaty 2019-01-08 13:20:43 +02:00
parent 89d7b863f3
commit ef66d5e4f5
1 changed files with 11 additions and 0 deletions

View File

@ -1171,6 +1171,17 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
"gateway. Router:%s has been removed from "
"DB and backend",
router['id'])
if cfg.CONF.nsx_p.allow_passthrough:
try:
# Enable standby relocation on this router
self.nsxpolicy.tier1.set_standby_relocation(
router['id'],
enable_standby_relocation=True)
except Exception as ex:
LOG.warning("Failed to enable standby relocation for router "
"%s: %s", router['id'], ex)
return self.get_router(context, router['id'])
def delete_router(self, context, router_id):