Sort host labels alphabetically to improve readability and
consistency across hosts. This matches the behavior of
structured formats such as yaml.
Fixes: https://tracker.ceph.com/issues/74290
Signed-off-by: Shubha Jain <SHUBHA.JAIN1@ibm.com>
table.right_padding_width = 2
for host in natsorted(hosts, key=lambda h: h.hostname):
row = (host.hostname, host.addr, ','.join(
- host.labels), host.status.capitalize())
+ sorted(host.labels)), host.status.capitalize())
if show_detail and isinstance(host, HostDetails):
row += (host.server, host.cpu_summary, host.ram,