Merge "Not able to upload volume to image"
This commit is contained in:
commit
4ec11e181e
|
@ -170,7 +170,9 @@ class ProtectOperation(protection_plugin.Operation):
|
||||||
force=True,
|
force=True,
|
||||||
image_name='temporary_image_of_{0}'.format(temporary_volume.id),
|
image_name='temporary_image_of_{0}'.format(temporary_volume.id),
|
||||||
container_format="bare",
|
container_format="bare",
|
||||||
disk_format="raw"
|
disk_format="raw",
|
||||||
|
visibility="private",
|
||||||
|
protected=False
|
||||||
)
|
)
|
||||||
image_id = image[1]['os-volume_upload_image']['image_id']
|
image_id = image[1]['os-volume_upload_image']['image_id']
|
||||||
is_success = utils.status_poll(
|
is_success = utils.status_poll(
|
||||||
|
|
|
@ -211,6 +211,15 @@ class VolumeGlanceProtectionPluginTest(base.TestCase):
|
||||||
|
|
||||||
call_hooks(protect_operation, self.checkpoint, resource, self.cntxt,
|
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):
|
def test_delete_backup(self):
|
||||||
resource = Resource(id="123",
|
resource = Resource(id="123",
|
||||||
|
|
Loading…
Reference in New Issue