From ff14c76e7c456ef60724b98f1e3fa7a83087fd6d Mon Sep 17 00:00:00 2001 From: Luiz Gavioli Date: Thu, 21 Feb 2019 08:27:31 -0300 Subject: [PATCH] [NetApp] Casting block_count to int before calling ONTAP API. When calling ONTAP API the block_count is sent as a float which isn't accepted by the API because it will have a trailing '.0'. So it's needed to cast it to int before send it to the API as string. Change-Id: Ia1f9b4717506a227af42f4f534278e0d9ab14dad Closes-Bug: #1818506 --- cinder/volume/drivers/netapp/dataontap/client/client_cmode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/volume/drivers/netapp/dataontap/client/client_cmode.py b/cinder/volume/drivers/netapp/dataontap/client/client_cmode.py index 4a34fb21ee5..01b11f41582 100644 --- a/cinder/volume/drivers/netapp/dataontap/client/client_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/client/client_cmode.py @@ -499,7 +499,7 @@ class Client(client_base.Client): 'destination-block-number': six.text_type(dest_block), 'block-count': - six.text_type(block_count)}) + six.text_type(int(block_count))}) block_ranges.add_child_elem(block_range) src_block += int(block_count) dest_block += int(block_count)