Skip to content

Commit e2ba3ce

Browse files
authored
Merge pull request #594 from sdodsley/hsbc_info
Fix code regression for vol info
2 parents d16906d + fca791c commit e2ba3ce

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minor_changes:
2+
- purefa_info - Fix regression of code that caused volume host connectivity info to be lost

plugins/modules/purefa_info.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,23 @@ def generate_vol_dict(module, array, performance):
15471547
].write_bytes_per_sec,
15481548
"writes_per_sec": vols_performance[performance].writes_per_sec,
15491549
}
1550+
cvols = array.list_volumes(connect=True)
1551+
for cvol in range(0, len(cvols)):
1552+
volume = cvols[cvol]["name"]
1553+
voldict = {"host": cvols[cvol]["host"], "lun": cvols[cvol]["lun"]}
1554+
volume_info[volume]["hosts"].append(voldict)
1555+
if ACTIVE_DR_API in api_version:
1556+
voltags = array.list_volumes(tags=True)
1557+
for voltag in range(0, len(voltags)):
1558+
if voltags[voltag]["namespace"] != "vasa-integration.purestorage.com":
1559+
volume = voltags[voltag]["name"]
1560+
tagdict = {
1561+
"key": voltags[voltag]["key"],
1562+
"value": voltags[voltag]["value"],
1563+
"copyable": voltags[voltag]["copyable"],
1564+
"namespace": voltags[voltag]["namespace"],
1565+
}
1566+
volume_info[volume]["tags"].append(tagdict)
15501567
return volume_info
15511568

15521569

0 commit comments

Comments
 (0)