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
This commit is contained in:
Ben Swartzlander 2014-02-25 11:44:14 -08:00
parent a22f22cffc
commit b40efb3633
3 changed files with 12 additions and 9 deletions

View 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'\

View 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'\

View 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)