Merge "Fix port restore in neutron protection plugin"

This commit is contained in:
Jenkins 2017-08-14 07:22:31 +00:00 committed by Gerrit Code Review
commit 6ea8d5033a
1 changed files with 3 additions and 2 deletions

View File

@ -386,8 +386,9 @@ class RestoreOperation(protection_plugin.Operation):
security_groups = port_data["security_groups"]
if security_groups:
props['security_groups'] = [
new_resources.get(sg)
for sg in security_groups if sg != 'default'
sg
for sg in security_groups
if new_resources.get(sg) != 'default'
]
port_id = neutron_client.create_port({'port': props})['port']['id']