diff options
author | Damon Li <damonl@vmware.com> | 2020-01-08 22:58:48 -0800 |
---|---|---|
committer | Damon Li <damonl@vmware.com> | 2020-01-10 07:16:49 +0000 |
commit | 60d23fb1e8d4a85ba40162ca8fcc511973f57a09 (patch) | |
tree | 567326f2dcf839ab63ab58a9d254b075fd5a6379 /oslo_vmware/tests | |
parent | fa7a6e35e5984d6f2b36e31368fe4634f7a693e2 (diff) | |
download | oslo-vmware-60d23fb1e8d4a85ba40162ca8fcc511973f57a09.tar.gz |
Pass "store_id" to backend when transfer volume to image2.35.0
Glance supports multiple stores now. In order to use this feature, on
patch #661676, it added parameter "store_id" when call function
"image_transfer.upload_image". We need to parse this parameter and pass
it to "image_service.update" function.
Closes-Bug: #1857094
Change-Id: I03747f54545ae3f91bf10de76d07de6828a419d6
Diffstat (limited to 'oslo_vmware/tests')
-rw-r--r-- | oslo_vmware/tests/test_image_transfer.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/oslo_vmware/tests/test_image_transfer.py b/oslo_vmware/tests/test_image_transfer.py index 08ac0e7..0bb61b7 100644 --- a/oslo_vmware/tests/test_image_transfer.py +++ b/oslo_vmware/tests/test_image_transfer.py @@ -372,6 +372,7 @@ class ImageTransferUtilityTest(base.TestCase): image_name = 'fake_image' image_version = 1 + store_id = 'fake_store' fake_VmdkReadHandle = mock.Mock() fake_rw_handles_VmdkReadHandle.return_value = fake_VmdkReadHandle @@ -389,7 +390,8 @@ class ImageTransferUtilityTest(base.TestCase): vmdk_size=image_size, is_public=is_public, image_name=image_name, - image_version=image_version) + image_version=image_version, + store_id=store_id) fake_rw_handles_VmdkReadHandle.assert_called_once_with(session, host, @@ -408,4 +410,5 @@ class ImageTransferUtilityTest(base.TestCase): image_service.update.assert_called_once_with(context, image_id, image_metadata, - data=fake_VmdkReadHandle) + data=fake_VmdkReadHandle, + store_id=store_id) |