mclu list: Sort lists of guests when displaying them.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 27 May 2014 21:41:42 +0000 (22:41 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 27 May 2014 21:41:42 +0000 (22:41 +0100)
mclu_list.py

index 4b2c956..ace59a4 100644 (file)
@@ -50,12 +50,12 @@ def run (c, args):
     running, inactive = lib.get_all_guests (c)
 
     if show_running:
-        for guest in running.values():
+        for guest in sorted (running.values()):
             node_name = guest['node']
             dom_name = guest['vm']
             full_name = "%s:%s" % (node_name, dom_name)
             print "%-40s running" % full_name
 
     if show_inactive:
-        for name in inactive.values():
+        for name in sorted (inactive.values()):
             print "%-40s inactive" % name