From 0258fe0c6a048c3f7bfacc1fdfec76786099e798 Mon Sep 17 00:00:00 2001 From: Sabari Kumar Murugesan Date: Sun, 24 Jul 2016 18:33:26 -0700 Subject: [PATCH] Add http_method to download_stream_optimized_data download_stream_optimized_data method doesn't pass http_method to VmdkWriteHandle. Added the kwarg. Change-Id: I38755c0a693ee29189a79f48b9f61beb2e45de9a --- oslo_vmware/image_transfer.py | 3 ++- oslo_vmware/tests/test_image_transfer.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/oslo_vmware/image_transfer.py b/oslo_vmware/image_transfer.py index c06e0bb..c4e35bf 100644 --- a/oslo_vmware/image_transfer.py +++ b/oslo_vmware/image_transfer.py @@ -159,7 +159,8 @@ def download_stream_optimized_data(context, timeout_secs, read_handle, kwargs.get('resource_pool'), kwargs.get('vm_folder'), kwargs.get('vm_import_spec'), - file_size) + file_size, + kwargs.get('http_method', 'PUT')) _start_transfer(read_handle, write_handle, timeout_secs) return write_handle.get_imported_vm() diff --git a/oslo_vmware/tests/test_image_transfer.py b/oslo_vmware/tests/test_image_transfer.py index d998543..1cb6da9 100644 --- a/oslo_vmware/tests/test_image_transfer.py +++ b/oslo_vmware/tests/test_image_transfer.py @@ -135,7 +135,8 @@ class ImageTransferUtilityTest(base.TestCase): resource_pool, vm_folder, vm_import_spec, - image_size) + image_size, + 'PUT') fake_transfer.assert_called_once_with(read_handle, fake_VmdkWriteHandle,