From 52b783c2aa397b487189ffba3531fcedf5312a16 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Wed, 17 Nov 2010 11:52:04 +0100 Subject: [PATCH] LUSetClusterParms: fix validation of beparams Since the contents of the dict is validated via the ForceDictType, we can simply require that it is a dict here. The previous check was wrong, as it was copied from the HV checks (which also doesn't verify the leaf dict type). Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/cmdlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 0ce865504..1a30b33aa 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -2613,7 +2613,7 @@ class LUSetClusterParams(LogicalUnit): ("enabled_hypervisors", None, _TOr(_TAnd(_TListOf(_TElemOf(constants.HYPER_TYPES)), _TTrue), _TNone)), ("hvparams", None, _TOr(_TDictOf(_TNonEmptyString, _TDict), _TNone)), - ("beparams", None, _TOr(_TDictOf(_TNonEmptyString, _TDict), _TNone)), + ("beparams", None, _TOr(_TDict, _TNone)), ("os_hvp", None, _TOr(_TDictOf(_TNonEmptyString, _TDict), _TNone)), ("osparams", None, _TOr(_TDictOf(_TNonEmptyString, _TDict), _TNone)), ("candidate_pool_size", None, _TOr(_TStrictPositiveInt, _TNone)), -- GitLab