Remove extraneous check in policy creation
authorIustin Pop <iustin@google.com>
Thu, 29 Dec 2011 15:24:33 +0000 (16:24 +0100)
committerIustin Pop <iustin@google.com>
Fri, 13 Jan 2012 13:16:50 +0000 (14:16 +0100)
The values are already checked in CreateIPolicy, no need to manually
check them again.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>

lib/client/gnt_cluster.py
lib/client/gnt_group.py

index 64ea490..d1ecbd5 100644 (file)
@@ -990,8 +990,6 @@ def SetClusterParams(opts, args):
                                   ispecs_disk_count=opts.ispecs_disk_count,
                                   ispecs_disk_size=opts.ispecs_disk_size,
                                   ispecs_nic_count=opts.ispecs_nic_count)
-  for value in ipolicy.values():
-    utils.ForceDictType(value, constants.ISPECS_PARAMETER_TYPES)
 
   mnh = opts.maintain_node_health
 
index d5cb0ac..f39c6e5 100644 (file)
@@ -194,9 +194,6 @@ def SetGroupParams(opts, args):
     ispecs_nic_count=opts.ispecs_nic_count,
     group_ipolicy=True,
     allowed_values=[constants.VALUE_DEFAULT])
-  for key in ipolicy.keys():
-    utils.ForceDictType(ipolicy[key], constants.ISPECS_PARAMETER_TYPES,
-                        allowed_values=[constants.VALUE_DEFAULT])
 
   op = opcodes.OpGroupSetParams(group_name=args[0],
                                 ndparams=opts.ndparams,