NSX|V: ensure that spoofguard policy is port update

Ensure that the address pair is updated on the backend when a port
is updtaed.

Change-Id: I026ad59419ca089704ed8d42405f452271e707e3
This commit is contained in:
Gary Kotton 2015-11-04 23:15:24 -08:00 committed by Kobi Samoray
parent 90e15d9886
commit 6d93dd491d

View File

@ -958,10 +958,10 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
port['port'],
ret_port)
update_assigned_addresses = False
if addr_pair.ADDRESS_PAIRS in attrs:
self.update_address_pairs_on_port(context, id, port,
original_port,
ret_port)
update_assigned_addresses = self.update_address_pairs_on_port(
context, id, port, original_port, ret_port)
if comp_owner_update:
# Create dhcp bindings, the port is now owned by an instance
@ -984,7 +984,8 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
self._delete_dhcp_static_binding(context, original_port)
else:
# Update vnic with the newest approved IP addresses
if has_port_security and updates_fixed_ips:
if (has_port_security and
(updates_fixed_ips or update_assigned_addresses)):
LOG.debug("Updating vnic port fixed-ips: port %s, vnic "
"%s, fixed-ips %s",
id, vnic_id, ret_port['fixed_ips'])