TVD: make security group logging more robust
Ensure that DVS security groups (which do not have this extension) do not cause exceptions Change-Id: I1a318347f92d6d793768dd20d653c872a3f75da3
This commit is contained in:
parent
6268a1f313
commit
8960282459
@ -561,7 +561,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
||||
# If the section/sg is already logged, then no action is
|
||||
# required.
|
||||
for sg in [sg for sg in self.get_security_groups(context)
|
||||
if sg[sg_logging.LOGGING] is False]:
|
||||
if sg.get(sg_logging.LOGGING) is False]:
|
||||
if sg.get(sg_policy.POLICY):
|
||||
# Logging is not relevant with a policy
|
||||
continue
|
||||
|
@ -667,7 +667,7 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
|
||||
fields=['id',
|
||||
sg_logging.LOGGING])
|
||||
for sg in [sg for sg in secgroups
|
||||
if sg[sg_logging.LOGGING] is False]:
|
||||
if sg.get(sg_logging.LOGGING) is False]:
|
||||
nsgroup_id, section_id = nsx_db.get_sg_mappings(
|
||||
context.session, sg['id'])
|
||||
if section_id:
|
||||
|
Loading…
x
Reference in New Issue
Block a user