]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Manage existing: fix volume object saving
authorEric Harney <eharney@redhat.com>
Thu, 19 Nov 2015 20:01:25 +0000 (15:01 -0500)
committerEric Harney <eharney@redhat.com>
Thu, 19 Nov 2015 20:16:29 +0000 (15:16 -0500)
This needs an update to work with volume objects.

Currently, manage existing can fail here.

Change-Id: I9197220be201cbbb1cd8266ebb58b57641fc216f
Closes-Bug: #1518050

cinder/volume/flows/manager/manage_existing.py

index dcbd8ae3735404f8e68db46c02aed2f32ebd9448..9d2ac1886dc9c6f0cf4e8032c3677fcdd0d7bf81 100644 (file)
@@ -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") %