From 7c789079a37bd2ce0d29e15e2216c3b09076c093 Mon Sep 17 00:00:00 2001 From: Clinton Knight Date: Fri, 8 Jan 2016 13:17:08 -0500 Subject: [PATCH] Fix thin provisioning flags in NetApp drivers The Cinder scheduler expects thin provisioning support to be reported by drivers as 'thin_provisioning_support' and 'thick_provisioning_support'. The NetApp Data ONTAP drivers for iSCSI/FC incorrectly report those flags as 'thin_provisioned_support' and 'thick_provisioned_support'. It's a trivial change to fix that. Closes-Bug: #1532285 Change-Id: I84eb867b753e18825e619e16b4121b34230c06ee --- .../tests/unit/volume/drivers/netapp/dataontap/fakes.py | 8 ++++---- .../volume/drivers/netapp/dataontap/test_block_7mode.py | 4 ++-- .../volume/drivers/netapp/dataontap/test_block_cmode.py | 4 ++-- cinder/volume/drivers/netapp/dataontap/block_7mode.py | 4 ++-- cinder/volume/drivers/netapp/dataontap/block_cmode.py | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py b/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py index b110038d305..32773e71ef5 100644 --- a/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py +++ b/cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py @@ -232,8 +232,8 @@ FAKE_CMODE_POOLS = [ 'pool_name': 'open123', 'reserved_percentage': 0, 'total_capacity_gb': 4.65, - 'thin_provisioned_support': True, - 'thick_provisioned_support': False, + 'thin_provisioning_support': True, + 'thick_provisioning_support': False, 'provisioned_capacity_gb': 0.93, 'max_over_subscription_ratio': 20.0, } @@ -335,8 +335,8 @@ FAKE_7MODE_POOLS = [ 'total_capacity_gb': 0.0, 'free_capacity_gb': 0.0, 'max_over_subscription_ratio': 20.0, - 'thin_provisioned_support': False, - 'thick_provisioned_support': True, + 'thin_provisioning_support': False, + 'thick_provisioning_support': True, 'provisioned_capacity_gb': 0.0, } ] diff --git a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_7mode.py b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_7mode.py index c178a70d53c..a7e6099199f 100644 --- a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_7mode.py +++ b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_7mode.py @@ -498,8 +498,8 @@ class NetAppBlockStorage7modeLibraryTestCase(test.TestCase): expected = [{ 'pool_name': 'vol1', 'QoS_support': False, - 'thin_provisioned_support': not thick, - 'thick_provisioned_support': thick, + 'thin_provisioning_support': not thick, + 'thick_provisioning_support': thick, 'provisioned_capacity_gb': 2.94, 'free_capacity_gb': 1339.27, 'total_capacity_gb': 1342.21, diff --git a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_cmode.py b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_cmode.py index c2bba088844..c75c5276e13 100644 --- a/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_cmode.py +++ b/cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_cmode.py @@ -337,8 +337,8 @@ class NetAppBlockStorageCmodeLibraryTestCase(test.TestCase): expected = [{'pool_name': 'vola', 'netapp_unmirrored': 'true', 'QoS_support': True, - 'thin_provisioned_support': not thick, - 'thick_provisioned_support': thick, + 'thin_provisioning_support': not thick, + 'thick_provisioning_support': thick, 'provisioned_capacity_gb': 8.0, 'netapp_thick_provisioned': netapp_thick, 'netapp_nocompression': 'true', diff --git a/cinder/volume/drivers/netapp/dataontap/block_7mode.py b/cinder/volume/drivers/netapp/dataontap/block_7mode.py index cf3a749aa65..fd39d51e5f7 100644 --- a/cinder/volume/drivers/netapp/dataontap/block_7mode.py +++ b/cinder/volume/drivers/netapp/dataontap/block_7mode.py @@ -305,8 +305,8 @@ class NetAppBlockStorage7modeLibrary(block_base.NetAppBlockStorageLibrary): thick = ( self.configuration.netapp_lun_space_reservation == 'enabled') - pool['thick_provisioned_support'] = thick - pool['thin_provisioned_support'] = not thick + pool['thick_provisioning_support'] = thick + pool['thin_provisioning_support'] = not thick pools.append(pool) diff --git a/cinder/volume/drivers/netapp/dataontap/block_cmode.py b/cinder/volume/drivers/netapp/dataontap/block_cmode.py index 896f42bfb33..f38e2b6aac4 100644 --- a/cinder/volume/drivers/netapp/dataontap/block_cmode.py +++ b/cinder/volume/drivers/netapp/dataontap/block_cmode.py @@ -246,8 +246,8 @@ class NetAppBlockStorageCmodeLibrary(block_base.NetAppBlockStorageLibrary): thick = (not thin and self.configuration.netapp_lun_space_reservation == 'enabled') - pool['thick_provisioned_support'] = thick - pool['thin_provisioned_support'] = not thick + pool['thick_provisioning_support'] = thick + pool['thin_provisioning_support'] = not thick pools.append(pool)