Fix incorrect 'any' function call
authorFederico Morg Pareschi <morg@google.com>
Wed, 4 Jan 2017 15:11:41 +0000 (15:11 +0000)
committerFederico Morg Pareschi <morg@google.com>
Wed, 4 Jan 2017 16:48:29 +0000 (16:48 +0000)
As introduced by commit 77807d83 and d388e30c6d
and was not caught during the code review process.

Signed-off-by: Federico Morg Pareschi <morg@google.com>
Reviewed-by: Brian Foley <bpfoley@google.com>

lib/cmdlib/instance_set_params.py
tools/move-instance

index d443c9c..228f8aa 100644 (file)
@@ -994,9 +994,9 @@ class LUInstanceSetParams(LogicalUnit):
                    else self.instance.os)
 
     if compat.any(
-        self.op.osparams, self.op.osparams_private,
-        self.op.clear_osparams, self.op.clear_osparams_private,
-        self.op.remove_osparams, self.op.remove_osparams_private):
+        [self.op.osparams, self.op.osparams_private,
+         self.op.clear_osparams, self.op.clear_osparams_private,
+         self.op.remove_osparams, self.op.remove_osparams_private]):
       public_parms = self.op.osparams or {}
       private_parms = self.op.osparams_private or {}
       remove_osparams = self.op.remove_osparams or []
index 5f33363..b801f67 100755 (executable)
@@ -943,9 +943,9 @@ def _CheckInstanceOptions(parser, options, instance_names):
       options.nics = cli.ParseNicOption(options.nics)
   else:
     # Moving more than one instance
-    if compat.any(options.dest_instance_name, options.dest_primary_node,
-                  options.dest_secondary_node, options.hvparams,
-                  options.beparams, options.osparams, options.nics):
+    if compat.any([options.dest_instance_name, options.dest_primary_node,
+                   options.dest_secondary_node, options.hvparams,
+                   options.beparams, options.osparams, options.nics]):
       parser.error("The options --dest-instance-name, --dest-primary-node,"
                    " --dest-secondary-node, --hypervisor-parameters,"
                    " --backend-parameters, --os-parameters and --net can"