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 10:53:49 +0000 (12:53 +0200)
osparams are now recognized as changes, so changing only those without
other changes works too now.

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

lib/cmdlib/instance.py

index 137f2af..ac27f35 100644 (file)
@@ -2349,8 +2349,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: