Add logging when initializing a default FW section

Change-Id: I1a40120b6118c28bb508e37f6060f25e0611c481
changes/55/570355/1
Adit Sarfaty 5 years ago
parent 734270d9e9
commit d1362ba0d9

@ -567,14 +567,17 @@ class NsxLibFirewallSection(utils.NsxLibApiBase):
def init_default(self, name, description, nested_groups,
log_sg_blocked_traffic):
LOG.info("Initializing the default section named %s", name)
fw_sections = self.list()
for section in reversed(fw_sections):
if section['display_name'] == name:
LOG.info("Found existing default section %s", section['id'])
break
else:
tags = self.build_v3_api_version_tag()
section = self.create_empty(
name, description, nested_groups, tags)
LOG.info("Creating a new default section %s", section['id'])
block_rule = self.get_rule_dict(
'Block All', action=consts.FW_ACTION_DROP,

Loading…
Cancel
Save