Added sorting of hosts

This commit is contained in:
Anton Beloglazov 2012-10-09 12:48:57 +11:00
parent 5d762da6d0
commit c46ae0017b

View File

@ -65,7 +65,8 @@ for host, vms in hosts_to_vms.items():
hosts_ram_usage[host] = manager.host_used_ram(nova, host)
for host, vms in hosts_to_vms.items():
for host in sorted(hosts_to_vms.keys()):
vms = hosts_to_vms[host]
print '{0:24} {1:5d} / {2:5d} MHz {3:5d} / {4:5d} MB'. \
format(host,
hosts_cpu_usage[host],