]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix thin provisioning flags in NetApp drivers
authorClinton Knight <cknight@netapp.com>
Fri, 8 Jan 2016 18:17:08 +0000 (13:17 -0500)
committerClinton Knight <cknight@netapp.com>
Mon, 11 Jan 2016 21:34:32 +0000 (16:34 -0500)
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

cinder/tests/unit/volume/drivers/netapp/dataontap/fakes.py
cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_7mode.py
cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_cmode.py
cinder/volume/drivers/netapp/dataontap/block_7mode.py
cinder/volume/drivers/netapp/dataontap/block_cmode.py

index b110038d305541acf5d1e2487389209f4042d239..32773e71ef51fbdf6423e1ec2343a1890a45aecc 100644 (file)
@@ -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,
     }
 ]
index c178a70d53ca1f0c377bc7d5ba05f8c6663704dd..a7e6099199f0365c10ed8b618466f6f651a0d072 100644 (file)
@@ -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,
index c2bba08884429ea1e882891f9d47222cedc3007b..c75c5276e1359065aec4d1baeaafb3f3afbd9491 100644 (file)
@@ -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',
index cf3a749aa650ad718e21bfc8ce85b3d1d9fc33e0..fd39d51e5f774dbf65eaa1c8873850e526810e21 100644 (file)
@@ -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)
 
index 896f42bfb3339dcc27873e27c6dc575e037b7f9b..f38e2b6aac490312c3605148ff0d31066819a263 100644 (file)
@@ -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)