Remove _CheckBooleanOpField
authorIustin Pop <iustin@google.com>
Thu, 1 Jul 2010 17:03:03 +0000 (19:03 +0200)
committerIustin Pop <iustin@google.com>
Fri, 2 Jul 2010 15:01:32 +0000 (17:01 +0200)
This is no longer used, and we can remove it.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

lib/cmdlib.py

index a8295fa..e0b7882 100644 (file)
@@ -719,20 +719,6 @@ def _CheckOutputFields(static, dynamic, selected):
                                % ",".join(delta), errors.ECODE_INVAL)
 
 
-def _CheckBooleanOpField(op, name):
-  """Validates boolean opcode parameters.
-
-  This will ensure that an opcode parameter is either a boolean value,
-  or None (but that it always exists).
-
-  """
-  val = getattr(op, name, None)
-  if not (val is None or isinstance(val, bool)):
-    raise errors.OpPrereqError("Invalid boolean parameter '%s' (%s)" %
-                               (name, str(val)), errors.ECODE_INVAL)
-  setattr(op, name, val)
-
-
 def _CheckGlobalHvParams(params):
   """Validates that given hypervisor params are not global ones.