Hello,
Basically want to add the items of net_interface into aggregate_info or create new list/dictionary based on key value of node_name. Looking for assistance on how i can achieve this please and thank you.
Outcome of what want it listed below.
list called: aggregate_info
{
“name”: “agg_Data1_Cluster01”,
“node_name”: “TEST_NA_CLUSTER_01-01”,
“percent_used_capacity”: “46”,
“size_available”: 8141263818752,
“size_avaliable_80%”: 5122753242726,
“size_total”: 15092552880128,
“size_total_80%”: 12074042304102,
“size_used”: 6951289061376
},
{
“name”: “agg_Data1_Cluster02”,
“node_name”: “TEST_NA_CLUSTER_01-02”,
“percent_used_capacity”: “34”,
“size_available”: 5116275568640,
“size_avaliable_80%”: 3561215869747,
“size_total”: 7775298494464,
“size_total_80%”: 6220238795571,
“size_used”: 2659022925824
}
list called: net_interface
{
“address”: “XX.XXX.X.XXX”,
“address4oct”: “224”,
“data_protcol”: “none”,
“failover_group”: “Management”,
“node_name”: “TEST_NA_CLUSTER_01-01”,
“role”: “node_mgmt”,
“vserver”: “TEST_NA_CLUSTER_01”
},
{
“address”: “XX.XXX.X.XXX”,
“address4oct”: “226”,
“data_protcol”: “none”,
“failover_group”: “Management”,
“node_name”: “IQ-REG_NA_CLUSTER_01-02”,
“role”: “node_mgmt”,
“vserver”: “TEST_NA_CLUSTER_01”
}
Out Come want:
Dictionary called: aggregate_info (original) or new name
{
“name”: “agg_Data1_Cluster01”,
“node_name”: “TEST_NA_CLUSTER_01-01”,
“percent_used_capacity”: “46”,
“size_available”: 8141263818752,
“size_avaliable_80%”: 5122753242726,
“size_total”: 15092552880128,
“size_total_80%”: 12074042304102,
“size_used”: 6951289061376
“address”: “XX.XXX.X.XXX”,
“address4oct”: “224”,
“data_protcol”: “none”,
“failover_group”: “Management”,
“role”: “node_mgmt”,
“vserver”: “TEST_NA_CLUSTER_01”
},
{
“name”: “agg_Data1_Cluster02”,
“node_name”: “TEST_NA_CLUSTER_01-02”,
“percent_used_capacity”: “34”,
“size_available”: 5116275568640,
“size_avaliable_80%”: 3561215869747,
“size_total”: 7775298494464,
“size_total_80%”: 6220238795571,
“size_used”: 2659022925824
“address”: “XX.XXX.X.XXX”,
“address4oct”: “226”,
“data_protcol”: “none”,
“failover_group”: “Management”,
“role”: “node_mgmt”,
“vserver”: “TEST_NA_CLUSTER_01”
}