From de3722959c4461a2c5f1f9d28f2b0f90c6b0c802 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Tue, 29 Jun 2010 12:20:20 +0100
Subject: [PATCH] BatchCreate: get force_variant from specs not opts

There is no such option on the command line, and for batch creation it's
better to get the option from the json file (with a default of false, as
we fixed it in the previous patch).

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 scripts/gnt-instance | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index 8ee48c8b1..1a2831a99 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -479,7 +479,7 @@ def BatchCreate(opts, args):
                                   disk_template=specs['template'],
                                   mode=constants.INSTANCE_CREATE,
                                   os_type=specs['os'],
-                                  force_variant=opts.force_variant,
+                                  force_variant=specs["force_variant"],
                                   pnode=specs['primary_node'],
                                   snode=specs['secondary_node'],
                                   nics=tmp_nics,
-- 
GitLab