From: Ben Swartzlander Date: Tue, 25 Feb 2014 19:44:14 +0000 (-0800) Subject: Change warning message in NetApp driver for vsadmin creds X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b40efb3633b4bffada4d5f191d26c4c75da9815e;p=openstack-build%2Fcinder-build.git Change warning message in NetApp driver for vsadmin creds 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 --- diff --git a/cinder/volume/drivers/netapp/iscsi.py b/cinder/volume/drivers/netapp/iscsi.py index a8710ce2c..3d176cb21 100644 --- a/cinder/volume/drivers/netapp/iscsi.py +++ b/cinder/volume/drivers/netapp/iscsi.py @@ -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'\ diff --git a/cinder/volume/drivers/netapp/nfs.py b/cinder/volume/drivers/netapp/nfs.py index f43a8b07c..dc434030e 100644 --- a/cinder/volume/drivers/netapp/nfs.py +++ b/cinder/volume/drivers/netapp/nfs.py @@ -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'\ diff --git a/cinder/volume/drivers/netapp/ssc_utils.py b/cinder/volume/drivers/netapp/ssc_utils.py index 76385dd9a..ebd058885 100644 --- a/cinder/volume/drivers/netapp/ssc_utils.py +++ b/cinder/volume/drivers/netapp/ssc_utils.py @@ -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)