Merge "Not able to upload volume to image"

This commit is contained in:
Zuul 2018-10-16 01:41:57 +00:00 committed by Gerrit Code Review
commit 4ec11e181e
2 changed files with 12 additions and 1 deletions

View File

@ -170,7 +170,9 @@ class ProtectOperation(protection_plugin.Operation):
force=True,
image_name='temporary_image_of_{0}'.format(temporary_volume.id),
container_format="bare",
disk_format="raw"
disk_format="raw",
visibility="private",
protected=False
)
image_id = image[1]['os-volume_upload_image']['image_id']
is_success = utils.status_poll(

View File

@ -211,6 +211,15 @@ class VolumeGlanceProtectionPluginTest(base.TestCase):
call_hooks(protect_operation, self.checkpoint, resource, self.cntxt,
{})
self.cinder_client.volumes.upload_to_image.assert_called_with(
volume=Volume(id='2345', status='available', size=1),
force=True,
image_name='temporary_image_of_2345',
container_format="bare",
disk_format="raw",
visibility="private",
protected=False
)
def test_delete_backup(self):
resource = Resource(id="123",