From d4f70470b7c3af89d4bf97123f4d61ad8a58805b Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Tue, 10 Oct 2017 12:58:19 -0600 Subject: simpletable: Fix get_string method to return table-formatted string Output in cloud-init-output.log contained only the string representation of a SimpleTable object instead of the table formatted content. This bug also affected ssh_authkey_fingerprints. LP: #1722566 --- cloudinit/netinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit/netinfo.py') diff --git a/cloudinit/netinfo.py b/cloudinit/netinfo.py index 8f99d99c..993b26cf 100644 --- a/cloudinit/netinfo.py +++ b/cloudinit/netinfo.py @@ -171,7 +171,7 @@ def netdev_pformat(): else: fields = ['Device', 'Up', 'Address', 'Mask', 'Scope', 'Hw-Address'] tbl = SimpleTable(fields) - for (dev, d) in netdev.items(): + for (dev, d) in sorted(netdev.items()): tbl.add_row([dev, d["up"], d["addr"], d["mask"], ".", d["hwaddr"]]) if d.get('addr6'): tbl.add_row([dev, d["up"], -- cgit v1.2.1