summaryrefslogtreecommitdiff
path: root/cloudinit/netinfo.py
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2017-10-10 12:58:19 -0600
committerChad Smith <chad.smith@canonical.com>2017-10-10 12:58:19 -0600
commitd4f70470b7c3af89d4bf97123f4d61ad8a58805b (patch)
tree380ae0d12c9aec39f0ea05d600d6031ae58ceb46 /cloudinit/netinfo.py
parent45d361cb0b7f5e4e7d79522bd285871898358623 (diff)
downloadvyos-cloud-init-d4f70470b7c3af89d4bf97123f4d61ad8a58805b.tar.gz
vyos-cloud-init-d4f70470b7c3af89d4bf97123f4d61ad8a58805b.zip
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
Diffstat (limited to 'cloudinit/netinfo.py')
-rw-r--r--cloudinit/netinfo.py2
1 files changed, 1 insertions, 1 deletions
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"],