NSX|TVD: ensure that port update is under transaction
Change-Id: I24a2730d0a8caf2603754b8aea9cd36f0d6e7c9b
This commit is contained in:
parent
6c26c0124a
commit
f6799e0855
@ -2210,6 +2210,11 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
self._update_mac_learning_state(context, id,
|
self._update_mac_learning_state(context, id,
|
||||||
new_mac_learning_state)
|
new_mac_learning_state)
|
||||||
|
|
||||||
|
# update port security in DB if changed
|
||||||
|
if psec.PORTSECURITY in port['port']:
|
||||||
|
self._process_port_port_security_update(
|
||||||
|
context, port_data, ret_port)
|
||||||
|
|
||||||
if comp_owner_update:
|
if comp_owner_update:
|
||||||
# Create dhcp bindings, the port is now owned by an instance
|
# Create dhcp bindings, the port is now owned by an instance
|
||||||
self._create_dhcp_static_binding(context, ret_port)
|
self._create_dhcp_static_binding(context, ret_port)
|
||||||
@ -2255,11 +2260,6 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
'device owner [%(dev_own)s] and port %(pid)s',
|
'device owner [%(dev_own)s] and port %(pid)s',
|
||||||
{'dev_own': owner, 'pid': original_port['id']})
|
{'dev_own': owner, 'pid': original_port['id']})
|
||||||
|
|
||||||
# update port security in DB if changed
|
|
||||||
if psec.PORTSECURITY in port['port']:
|
|
||||||
self._process_port_port_security_update(
|
|
||||||
context, port_data, ret_port)
|
|
||||||
|
|
||||||
# Processing compute port update
|
# Processing compute port update
|
||||||
vnic_idx = original_port.get(ext_vnic_idx.VNIC_INDEX)
|
vnic_idx = original_port.get(ext_vnic_idx.VNIC_INDEX)
|
||||||
if validators.is_attr_set(vnic_idx) and is_compute_port:
|
if validators.is_attr_set(vnic_idx) and is_compute_port:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user