Merge "move make_port_dict back out of txn"
This commit is contained in:
commit
79381c0bf0
@ -783,4 +783,5 @@ class IpamBackendMixin(db_base_plugin_common.DbBasePluginCommon):
|
|||||||
context.session.expire(old_port_db, ['fixed_ips'])
|
context.session.expire(old_port_db, ['fixed_ips'])
|
||||||
ips = self.allocate_ips_for_port_and_store(
|
ips = self.allocate_ips_for_port_and_store(
|
||||||
context, {'port': port_copy}, port_copy['id'])
|
context, {'port': port_copy}, port_copy['id'])
|
||||||
|
getattr(old_port_db, 'fixed_ips') # refresh relationship before return
|
||||||
return self.Changes(add=ips, original=[], remove=[])
|
return self.Changes(add=ips, original=[], remove=[])
|
||||||
|
@ -361,6 +361,7 @@ class IpamPluggableBackend(ipam_backend_mixin.IpamBackendMixin):
|
|||||||
ip['subnet_id'], db_port.id)
|
ip['subnet_id'], db_port.id)
|
||||||
self._update_db_port(context, db_port, new_port, network_id,
|
self._update_db_port(context, db_port, new_port, network_id,
|
||||||
new_mac)
|
new_mac)
|
||||||
|
getattr(db_port, 'fixed_ips') # refresh relationship before return
|
||||||
except Exception:
|
except Exception:
|
||||||
with excutils.save_and_reraise_exception():
|
with excutils.save_and_reraise_exception():
|
||||||
if 'fixed_ips' in new_port:
|
if 'fixed_ips' in new_port:
|
||||||
|
Loading…
Reference in New Issue
Block a user