Merge "TVD Admin utils: Fix FWaaS calls"

This commit is contained in:
Zuul 2018-05-06 16:26:50 +00:00 committed by Gerrit Code Review
commit 6c80fa0c4f
3 changed files with 10 additions and 3 deletions

View File

@ -85,3 +85,9 @@ class EdgeFwaasTVDriverV2(fwaas_base_v2.FwaasDriverBase):
def apply_default_policy(self, agent_mode, apply_list, firewall_group): def apply_default_policy(self, agent_mode, apply_list, firewall_group):
d = self._get_driver_for_project(firewall_group['tenant_id']) d = self._get_driver_for_project(firewall_group['tenant_id'])
return d.apply_default_policy(agent_mode, apply_list, firewall_group) 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)

View File

@ -217,8 +217,9 @@ def update_dhcp_relay(resource, event, trigger, **kwargs):
# if FWaaS is enables, also update the firewall rules # if FWaaS is enables, also update the firewall rules
try: try:
plugin.update_router_firewall(admin_cxt, router['id']) plugin.update_router_firewall(admin_cxt, router['id'])
except Exception: except Exception as e:
pass LOG.warning("Updating router firewall was skipped because of "
"an error %s", e)
LOG.info("Done.") LOG.info("Done.")

View File

@ -158,7 +158,7 @@ class NsxV3PluginWrapper(plugin.NsxV3Plugin):
# This is an ugly patch to find out if it is v1 or v2 # This is an ugly patch to find out if it is v1 or v2
service_plugins = cfg.CONF.service_plugins service_plugins = cfg.CONF.service_plugins
for srv_plugin in 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: if 'v2' in srv_plugin:
# FWaaS V2 # FWaaS V2
self._init_fwaas_plugin( self._init_fwaas_plugin(