In branch-2.1 the conversion of NICs to Tuples has been unified to the
_NICListToTuple function, which is used by both hook generation and
instance info generation. Unfortunately the ip and mac fields got
swapped from what instance info expected, so the mac is shown as ip, and
vice versa. Fixing this.

Signed-off-by: Guido Trotter <[email protected]>
---
 scripts/gnt-instance |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index fd758d4..976be93 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1137,7 +1137,7 @@ def ShowInstanceConfig(opts, args):
     buf.write("    - memory: %dMiB\n" %
               instance["be_actual"][constants.BE_MEMORY])
     buf.write("    - NICs:\n")
-    for idx, (mac, ip, mode, link) in enumerate(instance["nics"]):
+    for idx, (ip, mac, mode, link) in enumerate(instance["nics"]):
       buf.write("      - nic/%d: MAC: %s, IP: %s, mode: %s, link: %s\n" %
                 (idx, mac, ip, mode, link))
     buf.write("  Disks:\n")
-- 
1.6.3.3

Reply via email to