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:
Gary Kotton 2017-05-12 05:33:29 -07:00
parent add5a5bfc8
commit 1b036cf984
1 changed files with 1 additions and 1 deletions

View File

@ -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(