Manage existing: fix volume object saving

This needs an update to work with volume objects.

Currently, manage existing can fail here.

Change-Id: I9197220be201cbbb1cd8266ebb58b57641fc216f
Closes-Bug: #1518050
This commit is contained in:
Eric Harney 2015-11-19 15:01:25 -05:00
parent ae84ce085f
commit e151aecab2

@ -79,8 +79,8 @@ class ManageExistingTask(flow_utils.CinderTask):
model_update = {}
model_update.update({'size': size})
try:
volume_ref = self.db.volume_update(context, volume_ref['id'],
model_update)
volume_ref.update(model_update)
volume_ref.save()
except exception.CinderException:
LOG.exception(_LE("Failed updating model of volume %(volume_id)s"
" with creation provided model %(model)s") %