Let the gnt-network client expect a list of instance names and not
UUIDs as returned by QueryNetworks (by both old and new style query
mechanism).

Signed-off-by: Dimitris Aragiorgis <[email protected]>
---
 lib/client/gnt_network.py |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/client/gnt_network.py b/lib/client/gnt_network.py
index 40f9c5b..2c6e464 100644
--- a/lib/client/gnt_network.py
+++ b/lib/client/gnt_network.py
@@ -246,12 +246,8 @@ def ShowNetworkConfig(_, args):
       ToStdout("  not connected to any node group")
 
     if instances:
-      idata = cl.QueryInstances([], ["uuid", "name"], False)
-      uuid2name = dict(idata)
-
       ToStdout("  used by %d instances:", len(instances))
-      for inst in instances:
-        name = uuid2name[inst]
+      for name in instances:
         ((ips, networks), ) = cl.QueryInstances([name],
                                                 ["nic.ips", "nic.networks"],
                                                 use_locking=False)
-- 
1.7.10.4

Reply via email to