There are a number of update methods in db/sqla/api
that update objects but no longer return the updated
reference for said object.
This patch adds the missing returns which are already
expected in the calling cidner/db/api wrapper. At some
point a close look at usage in callers
(ie cinder/volume/manager) should be done to make sure
we're being efficient here and not doing another get after
every update.
Change-Id: I0464d1879571a0044a416d652a186b1462c57fa2
Closes-Bug: #
1349912
with session.begin():
service_ref = _service_get(context, service_id, session=session)
service_ref.update(values)
+ return service_ref
###################
with session.begin():
quota_ref = _quota_get(context, project_id, resource, session=session)
quota_ref.hard_limit = limit
+ return quota_ref
@require_admin_context
quota_class_ref = _quota_class_get(context, class_name, resource,
session=session)
quota_class_ref.hard_limit = limit
+ return quota_class_ref
@require_admin_context
with session.begin():
snapshot_ref = _snapshot_get(context, snapshot_id, session=session)
snapshot_ref.update(values)
+ return snapshot_ref
####################