From 795ff7438494816dfa9b54f40afd445db8b31d09 Mon Sep 17 00:00:00 2001 From: Michal Kelner Mishali Date: Mon, 8 Apr 2019 15:32:37 +0300 Subject: [PATCH] NSX|P: Disable API passthrough for enable_standby_relocation Following updated support on backend, removing the need for passthrough API when enabling enable_standby_relocation. Change-Id: Ic1588f8aeb83115d5c51c94477b4f8e93fefafa8 Signed-off-by: Michal Kelner Mishali --- vmware_nsx/plugins/nsx_p/plugin.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/vmware_nsx/plugins/nsx_p/plugin.py b/vmware_nsx/plugins/nsx_p/plugin.py index 6ec882b5b3..26db89ebf8 100644 --- a/vmware_nsx/plugins/nsx_p/plugin.py +++ b/vmware_nsx/plugins/nsx_p/plugin.py @@ -1383,14 +1383,13 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): LOG.error("Tier0 %s does not have an edge cluster", tier0_uuid) - 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) + 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) # update firewall rules (there might be FW group waiting for a # service router) @@ -1398,14 +1397,13 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base): self.update_router_firewall(context, router_id) def delete_service_router(self, project_id, router_id): - if cfg.CONF.nsx_p.allow_passthrough: - try: - # Disable standby relocation on this router - self.nsxpolicy.tier1.set_standby_relocation( - router_id, enable_standby_relocation=False) - except Exception as ex: - LOG.warning("Failed to disable standby relocation for router " - "%s: %s", router_id, ex) + try: + # Disable standby relocation on this router + self.nsxpolicy.tier1.set_standby_relocation( + router_id, enable_standby_relocation=False) + except Exception as ex: + LOG.warning("Failed to disable standby relocation for router " + "%s: %s", router_id, ex) # remove the edge firewall if self.fwaas_callbacks and self.fwaas_callbacks.fwaas_enabled: