]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Change warning message in NetApp driver for vsadmin creds
authorBen Swartzlander <bswartz@netapp.com>
Tue, 25 Feb 2014 19:44:14 +0000 (11:44 -0800)
committerBen Swartzlander <bswartz@netapp.com>
Tue, 25 Feb 2014 19:57:32 +0000 (11:57 -0800)
The new warning messages explicitly lists the extra_specs that
can't be supported depending on the access level fo the creds
that were provided. Also corrects a spelling error for the
netapp_nodedup extra_spec.

Change-Id: I1b27d9f4043321a4812e4e457c32a1040676c8e5
Closes-Bug: 1284796

cinder/volume/drivers/netapp/iscsi.py
cinder/volume/drivers/netapp/nfs.py
cinder/volume/drivers/netapp/ssc_utils.py

index a8710ce2c8534f56815b20120fed5158ff653158..3d176cb21ceca6cfa8dfa1234d4f70f817fa22e0 100644 (file)
@@ -1061,7 +1061,7 @@ class NetAppDirectCmodeISCSIDriver(NetAppDirectISCSIDriver):
                 else 'false'
             data['netapp_dedup'] = 'true'\
                 if self.ssc_vols['dedup'] else 'false'
-            data['netapp_nodedupe'] = 'true'\
+            data['netapp_nodedup'] = 'true'\
                 if len(self.ssc_vols['all']) > len(self.ssc_vols['dedup'])\
                 else 'false'
             data['netapp_compression'] = 'true'\
index f43a8b07c7c99c82db566b4de769301639a93ede..dc434030e1be19f881c530ffb5a3991e4da9fbd1 100644 (file)
@@ -898,7 +898,7 @@ class NetAppDirectCmodeNfsDriver (NetAppDirectNfsDriver):
                 len(self.ssc_vols['mirrored']) else 'false'
             data['netapp_dedup'] = 'true'\
                 if self.ssc_vols['dedup'] else 'false'
-            data['netapp_nodedupe'] = 'true'\
+            data['netapp_nodedup'] = 'true'\
                 if len(self.ssc_vols['all']) >\
                 len(self.ssc_vols['dedup']) else 'false'
             data['netapp_compression'] = 'true'\
index 76385dd9acd8b3dae31025a1d7b5037f52636ff8..ebd058885fe2f64bbfc080945e2d9b0eef1444c6 100644 (file)
@@ -605,11 +605,14 @@ def get_volumes_for_specs(ssc_vols, specs):
 
 def check_ssc_api_permissions(na_server):
     """Checks backend ssc api permissions for the user."""
-    api_map = {'storage-disk-get-iter': ['disk type'],
-               'snapmirror-get-iter': ['data protection mirror'],
-               'sis-get-iter': ['deduplication', 'compression'],
-               'aggr-options-list-info': ['raid type'],
-               'volume-get-iter': ['volume information']}
+    api_map = {'storage-disk-get-iter': ['netapp:disk_type'],
+               'snapmirror-get-iter': ['netapp_mirrored',
+                                       'netapp_unmirrored'],
+               'sis-get-iter': ['netapp_dedup', 'netapp_nodedup',
+                                'netapp_compression',
+                                'netapp_nocompression'],
+               'aggr-options-list-info': ['netapp:raid_type'],
+               'volume-get-iter': []}
     failed_apis = na_utils.check_apis_on_cluster(na_server, api_map.keys())
     if failed_apis:
         if 'volume-get-iter' in failed_apis:
@@ -621,6 +624,6 @@ def check_ssc_api_permissions(na_server):
             for fail in failed_apis:
                 unsupp_ssc_features.extend(api_map[fail])
             LOG.warn(_("The user does not have access or sufficient"
-                       " privileges to use all ssc apis. The ssc"
-                       " features %s may not work as expected."),
+                       " privileges to use all netapp apis. The following"
+                       " extra_specs will fail or be ignored: %s"),
                      unsupp_ssc_features)