This extends the current data structure for the 'summary' report.
It adds `sn` (serial number information) and the `firmwares` dict
to the current data structure.
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
(cherry picked from commit
61d07e0a441aafd84a463868f777d6091f6e92fe)
for host in hosts:
_result[host] = {}
+ _result[host]['status'] = {}
data = self.data[host]
for component, details in data['status'].items():
res = any([member['status']['health'].lower() != 'ok' for member in data['status'][component].values()])
- _result[host][component] = mapper[res]
-
+ _result[host]['status'][component] = mapper[res]
+ _result[host]['sn'] = data['sn']
+ _result[host]['host'] = data['host']
+ _result[host]['firmwares'] = data['firmwares']
return _result
def common(self, endpoint: str, **kw: Any) -> Dict[str, Any]:
data = self.node_proxy.summary(hostname=hostname)
for k, v in data.items():
row = [k]
- row.extend([v[key] for key in ['storage', 'processors', 'network', 'memory', 'power', 'fans']])
+ row.extend([v['status'][key] for key in ['storage', 'processors', 'network', 'memory', 'power', 'fans']])
table.add_row(row)
output = table.get_string()
elif category == 'firmwares':