NSX|V: fix missing spoofguard ID validation
Do not throw and exception when the policy does not exist on the NSX. Change-Id: Ia3944281099e907954797cdbf15ed2d6fc9def42
This commit is contained in:
parent
add5a5bfc8
commit
1b036cf984
@ -118,7 +118,7 @@ def nsx_clean_spoofguard_policy(resource, event, trigger, **kwargs):
|
||||
LOG.error("Unable to retrieve policy %(p)s: %(e)s",
|
||||
{'p': policy_id, 'e': str(e)})
|
||||
else:
|
||||
if not c['spoofguardList']:
|
||||
if not c.get('spoofguardList'):
|
||||
LOG.error("Policy %s does not exist", policy_id)
|
||||
return
|
||||
confirm = admin_utils.query_yes_no(
|
||||
|
Loading…
Reference in New Issue
Block a user