From e695bd9ef0de6549494c7d53bda7ad1a636bd04e Mon Sep 17 00:00:00 2001 From: George Pochiscan Date: Thu, 6 Aug 2020 19:25:01 +0300 Subject: [PATCH] added Pool status to agent output --- hitachi-vsp/agent_hitachivsp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hitachi-vsp/agent_hitachivsp b/hitachi-vsp/agent_hitachivsp index 4e4d13f..23e0eea 100755 --- a/hitachi-vsp/agent_hitachivsp +++ b/hitachi-vsp/agent_hitachivsp @@ -113,13 +113,12 @@ def process_storage_pools (): raw_json = get_storage_pools() full_data = json.loads(raw_json) data = full_data["data"] - output("poolID\tpoolType\tpoolName\ttotalPhysicalCapacity\ttotalPoolCapacity\tavailableVolumeCapacity\tusedCapacityRate") + output("poolID\tpoolType\tpoolName\ttotalPhysicalCapacity\ttotalPoolCapacity\tavailableVolumeCapacity\tusedCapacityRate\tpoolStatus") for pool in data: - if pool["poolType"] == "HTI": - output("%s\t%s\t%s\t%s\t%s\t%s\t%s" % (pool["poolId"], pool["poolType"], pool["poolName"], \ - pool["totalPhysicalCapacity"], pool["totalPoolCapacity"], \ - pool["availableVolumeCapacity"], pool["usedCapacityRate"]) ) - + output("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % (pool["poolId"], pool["poolType"], pool["poolName"], + pool["totalPhysicalCapacity"], pool["totalPoolCapacity"], + pool["availableVolumeCapacity"], pool["usedCapacityRate"], + pool["poolStatus"],)) def process_storage_info(): output("<<>>")