diff --git a/vmware_nsx/services/fwaas/nsx_tv/edge_fwaas_driver_v2.py b/vmware_nsx/services/fwaas/nsx_tv/edge_fwaas_driver_v2.py index 94dc3c7917..edb1ca3a3f 100644 --- a/vmware_nsx/services/fwaas/nsx_tv/edge_fwaas_driver_v2.py +++ b/vmware_nsx/services/fwaas/nsx_tv/edge_fwaas_driver_v2.py @@ -85,3 +85,9 @@ class EdgeFwaasTVDriverV2(fwaas_base_v2.FwaasDriverBase): def apply_default_policy(self, agent_mode, apply_list, firewall_group): d = self._get_driver_for_project(firewall_group['tenant_id']) return d.apply_default_policy(agent_mode, apply_list, firewall_group) + + def translate_addresses_to_target(self, cidrs, fwaas_rule_id=None): + # This api is called directly from the core plugin + # Assuming nsx-T as it is the only one supported now. + return self.get_T_driver().translate_addresses_to_target( + cidrs, fwaas_rule_id=fwaas_rule_id) diff --git a/vmware_nsx/shell/admin/plugins/nsxv3/resources/routers.py b/vmware_nsx/shell/admin/plugins/nsxv3/resources/routers.py index d26af9d693..200c272e35 100644 --- a/vmware_nsx/shell/admin/plugins/nsxv3/resources/routers.py +++ b/vmware_nsx/shell/admin/plugins/nsxv3/resources/routers.py @@ -217,8 +217,9 @@ def update_dhcp_relay(resource, event, trigger, **kwargs): # if FWaaS is enables, also update the firewall rules try: plugin.update_router_firewall(admin_cxt, router['id']) - except Exception: - pass + except Exception as e: + LOG.warning("Updating router firewall was skipped because of " + "an error %s", e) LOG.info("Done.") diff --git a/vmware_nsx/shell/admin/plugins/nsxv3/resources/utils.py b/vmware_nsx/shell/admin/plugins/nsxv3/resources/utils.py index 4d92277ec4..db399b4067 100644 --- a/vmware_nsx/shell/admin/plugins/nsxv3/resources/utils.py +++ b/vmware_nsx/shell/admin/plugins/nsxv3/resources/utils.py @@ -158,7 +158,7 @@ class NsxV3PluginWrapper(plugin.NsxV3Plugin): # This is an ugly patch to find out if it is v1 or v2 service_plugins = cfg.CONF.service_plugins for srv_plugin in service_plugins: - if 'firewall' in srv_plugin: + if 'firewall' in srv_plugin or 'fwaas' in srv_plugin: if 'v2' in srv_plugin: # FWaaS V2 self._init_fwaas_plugin(