From b89a0ca744460e7e7d0ac214dbd9ac0856f9d69b Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Tue, 19 Feb 2019 12:36:01 +0200 Subject: [PATCH] Fix nsgroup update to access the logging field safely Change-Id: I9823cdca21f68886acf9b027398faa0cb63254b4 --- vmware_nsxlib/v3/security.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmware_nsxlib/v3/security.py b/vmware_nsxlib/v3/security.py index feddcd0e..8b8f3adb 100644 --- a/vmware_nsxlib/v3/security.py +++ b/vmware_nsxlib/v3/security.py @@ -56,7 +56,7 @@ class NsxLibNsGroup(utils.NsxLibApiBase): name = self.get_name(security_group) description = security_group['description'] logging = (log_sg_allowed_traffic or - security_group[consts.LOGGING]) + security_group.get(consts.LOGGING, False)) rules = self.firewall_section._process_rules_logging_for_update( section_id, logging) self.update(nsgroup_id, name, description)