mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes 45136 and 47641: (#47642)
- each volume in the volume_info should be identified by VOLUME_NAME:OWNING_VSERVER:AGGREGATE - do not fail if external key management is enabled
This commit is contained in:
parent
9d965906bd
commit
d08604eebc
1 changed files with 9 additions and 3 deletions
|
@ -108,8 +108,10 @@ class NetAppGatherFacts(object):
|
|||
result = self.server.invoke_successfully(api_call, enable_tunneling=False)
|
||||
return result
|
||||
except netapp_utils.zapi.NaApiError as e:
|
||||
self.module.fail_json(msg="Error calling API %s: %s" %
|
||||
(call, to_native(e)), exception=traceback.format_exc())
|
||||
if call in ['security-key-manager-key-get-iter']:
|
||||
return result
|
||||
else:
|
||||
self.module.fail_json(msg="Error calling API %s: %s" % (call, to_native(e)), exception=traceback.format_exc())
|
||||
|
||||
def get_ifgrp_info(self):
|
||||
net_port_info = self.netapp_info['net_port_info']
|
||||
|
@ -133,6 +135,9 @@ class NetAppGatherFacts(object):
|
|||
def get_generic_get_iter(self, call, attribute=None, field=None, query=None, children='attributes-list'):
|
||||
generic_call = self.call_api(call, query)
|
||||
|
||||
if generic_call is None:
|
||||
return None
|
||||
|
||||
if field is None:
|
||||
out = []
|
||||
else:
|
||||
|
@ -196,7 +201,7 @@ class NetAppGatherFacts(object):
|
|||
self.netapp_info['volume_info'] = self.get_generic_get_iter(
|
||||
'volume-get-iter',
|
||||
attribute='volume-attributes',
|
||||
field=('name', 'node', 'aggr-name'),
|
||||
field=('name', 'owning-vserver-name', 'aggr-name'),
|
||||
query={'max-records': '1024'}
|
||||
)
|
||||
self.netapp_info['lun_info'] = self.get_generic_get_iter(
|
||||
|
@ -234,6 +239,7 @@ class NetAppGatherFacts(object):
|
|||
field=('node', 'key-id'),
|
||||
query={'max-records': '1024'}
|
||||
)
|
||||
|
||||
self.netapp_info['vserver_info'] = self.get_generic_get_iter(
|
||||
'vserver-get-iter',
|
||||
attribute='vserver-info',
|
||||
|
|
Loading…
Reference in a new issue