- for node_name in node_data:
- if node_name in all_os[os_name]:
- nos = all_os[os_name][node_name]
- if isinstance(nos[0], objects.OS):
- nodes_valid.append(node_name)
- elif isinstance(nos[0], errors.InvalidOS):
- nodes_bad[node_name] = ("%s (path: %s)" %
- (nos[0].args[2], nos[0].args[1]))
+ nodes_hidden = {}
+ for node_name, node_info in node_data.iteritems():
+ nodes_hidden[node_name] = []
+ if node_info: # at least one entry in the per-node list
+ first_os_path, first_os_status, first_os_msg = node_info.pop(0)
+ first_os_msg = ("%s (path: %s)" % (_OsStatus(first_os_status,
+ first_os_msg),
+ first_os_path))
+ if first_os_status:
+ nodes_valid[node_name] = first_os_msg
+ else:
+ nodes_bad[node_name] = first_os_msg
+ for hpath, hstatus, hmsg in node_info:
+ nodes_hidden[node_name].append(" [hidden] path: %s, status: %s" %
+ (hpath, _OsStatus(hstatus, hmsg)))