Merge "Replace deprecated with_lockmode with with_for_update"

This commit is contained in:
Zuul 2019-06-26 16:37:01 +00:00 committed by Gerrit Code Review
commit b1fd1430ab
1 changed files with 2 additions and 2 deletions

View File

@ -1143,7 +1143,7 @@ def floating_ip_update(context, address, values):
def dnsdomain_get(context, fqdomain):
return model_query(context, models.DNSDomain, read_deleted="no").\
filter_by(domain=fqdomain).\
with_lockmode('update').\
with_for_update().\
first()
@ -3106,7 +3106,7 @@ def network_associate(context, project_id, network_id=None, force=False):
filter_kwargs['id'] = id
return model_query(context, models.Network, read_deleted="no").\
filter_by(**filter_kwargs).\
with_lockmode('update').\
with_for_update().\
first()
if not force: