Merge "move make_port_dict back out of txn"
This commit is contained in:
commit
79381c0bf0
@ -1315,7 +1315,7 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
|
||||
# conflict, bubble up a retry instead that should bring things
|
||||
# back to sanity.
|
||||
raise os_db_exc.RetryRequest(e)
|
||||
return self._make_port_dict(db_port)
|
||||
return self._make_port_dict(db_port)
|
||||
|
||||
@db_api.retry_if_session_inactive()
|
||||
def delete_port(self, context, id):
|
||||
|
@ -783,4 +783,5 @@ class IpamBackendMixin(db_base_plugin_common.DbBasePluginCommon):
|
||||
context.session.expire(old_port_db, ['fixed_ips'])
|
||||
ips = self.allocate_ips_for_port_and_store(
|
||||
context, {'port': port_copy}, port_copy['id'])
|
||||
getattr(old_port_db, 'fixed_ips') # refresh relationship before return
|
||||
return self.Changes(add=ips, original=[], remove=[])
|
||||
|
@ -361,6 +361,7 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
|
||||
ip['subnet_id'], db_port.id)
|
||||
self._update_db_port(context, db_port, new_port, network_id,
|
||||
new_mac)
|
||||
getattr(db_port, 'fixed_ips') # refresh relationship before return
|
||||
except Exception:
|
||||
with excutils.save_and_reraise_exception():
|
||||
if 'fixed_ips' in new_port:
|
||||
|
Loading…
x
Reference in New Issue
Block a user