From dc30b0e442a916703f7d12c2f31623bd95031e12 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 12 Mar 2009 11:54:22 +0000
Subject: [PATCH] Fix the --net option to gnt-instance add

Similar to the --disk fixes a while ago, --net is broken too. This patch
fixes it.

Reviewed-by: imsnah
---
 scripts/gnt-instance | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index ad7f237e4..9dde02fdc 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -321,7 +321,7 @@ def AddInstance(opts, args):
     except ValueError, err:
       raise errors.OpPrereqError("Invalid NIC index passed: %s" % str(err))
     nics = [{}] * nic_max
-    for nidx, ndict in opts.nics.items():
+    for nidx, ndict in opts.nics:
       nidx = int(nidx)
       nics[nidx] = ndict
   elif opts.no_nics:
-- 
GitLab