Nimble multi-attach bad format changes

Change-Id: Ia7797ac1204e08796e9d928d710bd9ce30f133bb
This commit is contained in:
Ajitha Robert 2020-09-17 07:06:09 -04:00
parent fb7edff4d0
commit 3424be8706
3 changed files with 11 additions and 7 deletions

View File

@ -735,8 +735,7 @@ class NimbleBaseVolumeDriver(san.SanDriver):
{'volume': volume.name, {'volume': volume.name,
'host_name': volume.host.split('@')[0]}) 'host_name': volume.host.split('@')[0]})
return True return True
else: return False
return False
@interface.volumedriver @interface.volumedriver
@ -1538,9 +1537,9 @@ class NimbleRestAPIExecutor(object):
"initiator_group_id": initiator_group_id} "initiator_group_id": initiator_group_id}
api = "access_control_records" api = "access_control_records"
r = self.get_query(api, filter) r = self.get_query(api, filter)
LOG.info("ACL record is %result", {'result': r.json()}) LOG.info("ACL record is %(result)s", {'result': r.json()})
if not r.json()['data']: if not r.json()['data']:
LOG.warning('ACL is not available for this volume %vol_id', { LOG.warning('ACL is not available for this volume %(vol_id)', {
'vol_id': volume_id}) 'vol_id': volume_id})
return return
return r.json()['data'][0] return r.json()['data'][0]
@ -1579,7 +1578,7 @@ class NimbleRestAPIExecutor(object):
LOG.debug("ACL Record %(acl)s", {"acl": acl_record}) LOG.debug("ACL Record %(acl)s", {"acl": acl_record})
if acl_record is not None: if acl_record is not None:
acl_id = acl_record['id'] acl_id = acl_record['id']
api = 'access_control_records/' + six.text_type(acl_id) api = 'access_control_records/%s' % acl_id
self.delete(api) self.delete(api)
except NimbleAPIException as ex: except NimbleAPIException as ex:
LOG.debug("remove_acl_exception: %s", ex) LOG.debug("remove_acl_exception: %s", ex)

View File

@ -128,6 +128,11 @@ The Nimble volume driver also supports the following extra spec options:
PERF_POL_NAME is the name of a performance policy which exists on the PERF_POL_NAME is the name of a performance policy which exists on the
Nimble array and should be enabled for every volume in a volume type. Nimble array and should be enabled for every volume in a volume type.
.. note::
When upgrading to OpenStack deployment to Victoria or later,
do unset ``nimble:multi-initiator`` extra-spec and set ``multiattach='<is> True'``.
nimble:dedupe'='true' nimble:dedupe'='true'
Used to enable dedupe support for a volume-type. Used to enable dedupe support for a volume-type.

View File

@ -1,8 +1,8 @@
--- ---
features: features:
- | - |
Add Multi-attach feature in Nimble driver. Added Multi-attach feature in Nimble driver.
upgrade: upgrade:
- | - |
Nimble specific extra-spec nimble:multi-initiator is removed. Nimble specific extra-spec ``nimble:multi-initiator`` is removed.
Common extra-spec multiattach is added. Common extra-spec multiattach is added.