From: Richard W.M. Jones Date: Tue, 27 May 2014 21:41:42 +0000 (+0100) Subject: mclu list: Sort lists of guests when displaying them. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=e055753931336c4534b45f9e6ea95f9e629b600a;p=mclu.git mclu list: Sort lists of guests when displaying them. --- diff --git a/mclu_list.py b/mclu_list.py index 4b2c956..ace59a4 100644 --- a/mclu_list.py +++ b/mclu_list.py @@ -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