From d3ce528be86e8f8f2914367f1d2337e23d9286e9 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 5 Jul 2010 13:28:36 +0200
Subject: [PATCH] OpCreateInstance: do not require hv/be/os params

It is perfectly legal to create an instance using only defaults
(although beparams will be most times passed in), so let's relax the
requirement for these three parameters.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/cmdlib.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index e0b78823c..b34cef9b8 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -6367,9 +6367,9 @@ class LUCreateInstance(LogicalUnit):
     ("name_check", True, _TBool),
     ("disks", _NoDefault, _TListOf(_TDict)),
     ("nics", _NoDefault, _TListOf(_TDict)),
-    ("hvparams", _NoDefault, _TDict),
-    ("beparams", _NoDefault, _TDict),
-    ("osparams", _NoDefault, _TDict),
+    ("hvparams", _EmptyDict, _TDict),
+    ("beparams", _EmptyDict, _TDict),
+    ("osparams", _EmptyDict, _TDict),
     ("no_install", None, _TMaybeBool),
     ("os_type", None, _TMaybeString),
     ("force_variant", False, _TBool),
-- 
GitLab