Revision 49bea583

b/lib/client/gnt_network.py
246 246
      ToStdout("  not connected to any node group")
247 247

  
248 248
    if instances:
249
      idata = cl.QueryInstances([], ["uuid", "name"], False)
250
      uuid2name = dict(idata)
251

  
249 252
      ToStdout("  used by %d instances:", len(instances))
250 253
      for inst in instances:
251
        ((ips, networks), ) = cl.QueryInstances([inst],
254
        name = uuid2name[inst]
255
        ((ips, networks), ) = cl.QueryInstances([name],
252 256
                                                ["nic.ips", "nic.networks"],
253 257
                                                use_locking=False)
254 258

  
......
256 260
                                    for idx, (ip, net) in enumerate(value)
257 261
                                      if net == uuid)
258 262

  
259
        ToStdout("    %s : %s", inst, l(zip(ips, networks)))
263
        ToStdout("    %s: %s", name, l(zip(ips, networks)))
260 264
    else:
261 265
      ToStdout("  not used by any instances")
262 266

  

Also available in: Unified diff