Merge "Fix show 'security-groups' field for port with no security-groups"

This commit is contained in:
Jenkins 2015-11-02 19:33:04 +00:00 committed by Gerrit Code Review
commit 1b6311d265
1 changed files with 3 additions and 7 deletions

View File

@ -654,13 +654,9 @@ class NsxV3Plugin(addr_pair_db.AllowedAddressPairsMixin,
port_data[pbin.VNIC_TYPE] = pbin.VNIC_NORMAL
sgids = self._get_security_groups_on_port(context, port)
if sgids is not None:
self._process_port_create_security_group(
context, port_data, sgids)
#FIXME(abhiraut): Security group should not be processed for
# a port belonging to an external network.
# Below call will fail since there is no lport
# in the backend.
self._process_port_create_security_group(
context, port_data, sgids)
if sgids:
security.update_lport_with_security_groups(
context, lport['id'], [], sgids)
return port_data