Commit d2acfe27 authored by Iustin Pop's avatar Iustin Pop
Browse files

Slighly improve multi-nic in gnt-instance info

Previously we had only one nic, so the NIC information was all on one
line. This patch changes it to:

    - NICs:
      - nic/0: MAC: aa:00:00:e8:b2:ef, IP: None, bridge: None
      - nic/1: MAC: aa:00:00:53:ca:92, IP: None, bridge: xen-br0
      - nic/2: MAC: aa:00:00:ba:e5:30, IP: None, bridge: None

Reviewed-by: ultrotter
parent 03d1dba2
......@@ -1009,10 +1009,10 @@ def ShowInstanceConfig(opts, args):
instance["be_actual"][constants.BE_VCPUS])
buf.write(" - memory: %dMiB\n" %
instance["be_actual"][constants.BE_MEMORY])
buf.write(" - NICs: %s\n" %
", ".join(["{MAC: %s, IP: %s, bridge: %s}" %
(mac, ip, bridge)
for mac, ip, bridge in instance["nics"]]))
buf.write(" - NICs:\n")
for idx, (mac, ip, bridge) in enumerate(instance["nics"]):
buf.write(" - nic/%d: MAC: %s, IP: %s, bridge: %s\n" %
(idx, mac, ip, bridge))
buf.write(" Block devices:\n")
for device in instance["disks"]:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment