Remove checks wrt IDISK_PARAMS from OpCode level
authorConstantinos Venetsanopoulos <cven@grnet.gr>
Tue, 4 Dec 2012 11:50:16 +0000 (13:50 +0200)
committerIustin Pop <iustin@google.com>
Wed, 12 Dec 2012 13:18:36 +0000 (14:18 +0100)
commit3e3ddbf0b655b78812875acbcbb360bdb6fc872b
treea1370ff7813209656f611b767c5d969c4768624c
parentcefd4a4a4fc4a56056c035c7798933c41ddcfe6d
Remove checks wrt IDISK_PARAMS from OpCode level

Change the "--disks" option validation, to just check the format
of the dict and do not check whether the keys are included in the
IDISK_PARAMS constant at OpCode level. This allows the passing of
arbitrary parameters at the CLI, which will then be logically
checked at LU level (inside CheckArguments).

Currently, the check wrt to IDISK_PARAMS already happens in all
related LUs (InstanceSetParams, InstanceCreate, InstanceRecreateDisks),
with the use of ForceDictType(), so there is no need for additional
checking code.

Signed-off-by: Constantinos Venetsanopoulos <cven@grnet.gr>
Signed-off-by: Iustin Pop <iustin@google.com>
[iustin@google.com: fixed a unittest that needed adjustement]
Reviewed-by: Iustin Pop <iustin@google.com>
lib/opcodes.py
test/ganeti.rapi.rlib2_unittest.py