Allow instance mods if only osparams are given
authorThomas Thrainer <thomasth@google.com>
Tue, 20 Aug 2013 10:37:08 +0000 (12:37 +0200)
committerThomas Thrainer <thomasth@google.com>
Tue, 20 Aug 2013 12:18:39 +0000 (14:18 +0200)
osparams are now recognized as changes, so changing only those without
other changes works too now.

(cherry picked from commit 5eae613c2e1e65101c5d5f7d2e8ffd7cc6edc7d5)

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

lib/cmdlib/instance.py

index 87aef09..e6abee2 100644 (file)
@@ -2316,8 +2316,8 @@ class LUInstanceSetParams(LogicalUnit):
   def CheckArguments(self):
     if not (self.op.nics or self.op.disks or self.op.disk_template or
             self.op.hvparams or self.op.beparams or self.op.os_name or
-            self.op.offline is not None or self.op.runtime_mem or
-            self.op.pnode):
+            self.op.osparams or self.op.offline is not None or
+            self.op.runtime_mem or self.op.pnode):
       raise errors.OpPrereqError("No changes submitted", errors.ECODE_INVAL)
 
     if self.op.hvparams: