nsx_v3: Move db access in update_port under same update transaction
Change-Id: I576aa62cf776bfa75c8dcb6d019796260856dc48
This commit is contained in:
parent
56be50105f
commit
0c2cda0859
@ -977,12 +977,13 @@ class NsxV3Plugin(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
parent_tag=tag)
|
parent_tag=tag)
|
||||||
|
|
||||||
def update_port(self, context, id, port):
|
def update_port(self, context, id, port):
|
||||||
original_port = super(NsxV3Plugin, self).get_port(context, id)
|
|
||||||
_, nsx_lport_id = nsx_db.get_nsx_switch_and_port_id(
|
|
||||||
context.session, id)
|
|
||||||
switch_profile_ids = None
|
switch_profile_ids = None
|
||||||
|
|
||||||
with context.session.begin(subtransactions=True):
|
with context.session.begin(subtransactions=True):
|
||||||
|
original_port = super(NsxV3Plugin, self).get_port(context, id)
|
||||||
|
_, nsx_lport_id = nsx_db.get_nsx_switch_and_port_id(
|
||||||
|
context.session, id)
|
||||||
|
|
||||||
updated_port = super(NsxV3Plugin, self).update_port(context,
|
updated_port = super(NsxV3Plugin, self).update_port(context,
|
||||||
id, port)
|
id, port)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user