NSX|V: fix for existing spoofguard policy
Ensure that the policy is published. Change-Id: Iba2ecd86e88ee4523b1af30554c6318b345059bc
This commit is contained in:
parent
8b06741ad7
commit
0356a7909c
@ -4530,10 +4530,15 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
try:
|
try:
|
||||||
self.nsx_v.vcns.approve_assigned_addresses(
|
self.nsx_v.vcns.approve_assigned_addresses(
|
||||||
sg_policy_id, vnic_id, mac_addr, approved_addrs)
|
sg_policy_id, vnic_id, mac_addr, approved_addrs)
|
||||||
self.nsx_v.vcns.publish_assigned_addresses(sg_policy_id, vnic_id)
|
|
||||||
except vsh_exc.AlreadyExists:
|
except vsh_exc.AlreadyExists:
|
||||||
# Entry already configured on the NSX
|
# Entry already configured on the NSX
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
|
self.nsx_v.vcns.publish_assigned_addresses(sg_policy_id, vnic_id)
|
||||||
|
except Exception as e:
|
||||||
|
LOG.warning("Failed to publish entry for port %(port)s "
|
||||||
|
"for vnic %(vnic)s: %(exc)s",
|
||||||
|
{'port': port['id'], 'vnic': vnic_id, 'exc': str(e)})
|
||||||
|
|
||||||
def _is_compute_port(self, port):
|
def _is_compute_port(self, port):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user