Revision 694e2444

b/scripts/gnt-os
91 91
          os_name = obj.args[0]
92 92
        if os_name not in all_os:
93 93
          all_os[os_name] = {}
94
        all_os[os_name][node_name] = obj
94
        if node_name not in all_os[os_name]:
95
          all_os[os_name][node_name] = []
96
        all_os[os_name][node_name].append(obj)
95 97

  
96 98
  max_name = len('Name')
97 99
  if all_os:
......
107 109
    nodes_valid = []
108 110
    nodes_bad = {}
109 111
    for node_name in node_data:
110
      nos = all_os[os_name].get(node_name, None)
111
      if isinstance(nos, objects.OS):
112
        nodes_valid.append(node_name)
113
      elif isinstance(nos, errors.InvalidOS):
114
        nodes_bad[node_name] = nos.args[1]
112
      if node_name in all_os[os_name]:
113
       nos = all_os[os_name][node_name]
114
       if isinstance(nos[0], objects.OS):
115
         nodes_valid.append(node_name)
116
       elif isinstance(nos[0], errors.InvalidOS):
117
         nodes_bad[node_name] = nos[0].args[1]
115 118
      else:
116 119
        nodes_bad[node_name] = "os dir not found"
117 120

  
......
121 124
      status = "invalid"
122 125
    else:
123 126
      status = "partial valid"
127

  
124 128
    logger.ToStdout(format % (max_name, os_name, max_node, status, ""))
125 129
    nodes_valid = utils.NiceSort(nodes_valid)
126 130
    for node_name in nodes_valid:
127
      logger.ToStdout(format % (max_name, "", max_node, node_name, "valid"))
131
      logger.ToStdout(format % (max_name, "", max_node, node_name, 
132
                      "valid (%s)" % all_os[os_name][node_name][0].path))
128 133
    nbk = utils.NiceSort(nodes_bad.keys())
129 134
    for node_name in nbk:
130 135
      logger.ToStdout(format % (max_name, "", max_node,

Also available in: Unified diff