Revision 48f85f75 scripts/gnt-os

b/scripts/gnt-os
194 194
    for node_name in node_data:
195 195
      if node_name in all_os[os_name]:
196 196
        first_os = all_os[os_name][node_name].pop(0)
197
        first_os_status = _DiagnoseOSStatus(first_os)
197
        first_os_msg = ("%s (path: %s)" %
198
                        (_DiagnoseOSStatus(first_os),
199
                         _DiagnoseOSPath(first_os)))
198 200
        if _DiagnoseOSValid(first_os):
199
          nodes_valid[node_name] = first_os_status
201
          nodes_valid[node_name] = first_os_msg
200 202
        else:
201
          nodes_bad[node_name] = first_os_status
203
          nodes_bad[node_name] = first_os_msg
202 204
      else:
203 205
        nodes_bad[node_name] = "OS not found"
204 206

  
......
217 219
                                  "[hidden] %s" %
218 220
                                  _DiagnoseOSStatus(dobj)))
219 221

  
220
    def _OutputPerNodeOSStatus(status_map):
221
      map_k = utils.NiceSort(status_map.keys())
222
    def _OutputPerNodeOSStatus(msg_map):
223
      map_k = utils.NiceSort(msg_map.keys())
222 224
      for node_name in map_k:
223 225
        logger.ToStdout(format % (max_name, "", max_node,
224
                                  node_name, status_map[node_name]))
226
                                  node_name, msg_map[node_name]))
225 227
        if node_name in all_os[os_name]:
226 228
          _OutputNodeHiddenOSStatus(all_os[os_name][node_name])
227 229

  

Also available in: Unified diff