mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add QoS support for purefa_facts module and fix to support vVols (#42919)
This commit is contained in:
parent
9bf12ee1c0
commit
86b72d1c8c
1 changed files with 22 additions and 3 deletions
|
@ -281,6 +281,7 @@ ansible_facts:
|
||||||
"subnet": {}
|
"subnet": {}
|
||||||
"volumes": {
|
"volumes": {
|
||||||
"ansible_data": {
|
"ansible_data": {
|
||||||
|
"bandwidth": null,
|
||||||
"hosts": [
|
"hosts": [
|
||||||
[
|
[
|
||||||
"host1",
|
"host1",
|
||||||
|
@ -288,7 +289,8 @@ ansible_facts:
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"serial": "43BE47C12334399B000114A6",
|
"serial": "43BE47C12334399B000114A6",
|
||||||
"size": 1099511627776
|
"size": 1099511627776,
|
||||||
|
"source": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
|
@ -450,8 +452,25 @@ def generate_vol_dict(array):
|
||||||
for vol in range(0, len(vols)):
|
for vol in range(0, len(vols)):
|
||||||
volume = vols[vol]['name']
|
volume = vols[vol]['name']
|
||||||
volume_facts[volume] = {
|
volume_facts[volume] = {
|
||||||
|
'source': vols[vol]['source'],
|
||||||
'size': vols[vol]['size'],
|
'size': vols[vol]['size'],
|
||||||
'serial': vols[vol]['serial'],
|
'serial': vols[vol]['serial'],
|
||||||
|
'hosts': [],
|
||||||
|
'bandwidth': ""
|
||||||
|
}
|
||||||
|
api_version = array._list_available_rest_versions()
|
||||||
|
if AC_REQUIRED_API_VERSION in api_version:
|
||||||
|
qvols = array.list_volumes(qos=True)
|
||||||
|
for qvol in range(0, len(qvols)):
|
||||||
|
volume = qvols[qvol]['name']
|
||||||
|
qos = qvols[qvol]['bandwidth_limit']
|
||||||
|
volume_facts[volume]['bandwidth'] = qos
|
||||||
|
vvols = array.list_volumes(protocol_endpoint=True)
|
||||||
|
for vvol in range(0, len(vvols)):
|
||||||
|
volume = vvols[vvol]['name']
|
||||||
|
volume_facts[volume] = {
|
||||||
|
'source': vols[vol]['source'],
|
||||||
|
'serial': vols[vol]['serial'],
|
||||||
'hosts': []
|
'hosts': []
|
||||||
}
|
}
|
||||||
cvols = array.list_volumes(connect=True)
|
cvols = array.list_volumes(connect=True)
|
||||||
|
|
Loading…
Reference in a new issue