Commit 1df4d430 authored by Iustin Pop's avatar Iustin Pop
Browse files

Change node parameter oob_program to VTYPE_STRING



Since this is an inheritable parameter, having it as a MABYE_STRING
creates only problems (per our derivation rules). We change it to
STRING, with the default "", meaning no program. Note that most of the
code already accepts this as valid for "no program", and some comments
even say that this is the expected value.

We have some other parameters like this, I'll have to investigate
whether they need to be changed too. But right now I need this for the
hconfd changes (it's a prerequisite for them, I forgot to send it in
that patch series).
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 4e27516b
......@@ -974,7 +974,7 @@ ND_OOB_PROGRAM = "oob_program"
ND_SPINDLE_COUNT = "spindle_count"
NDS_PARAMETER_TYPES = {
ND_OOB_PROGRAM: VTYPE_MAYBE_STRING,
ND_OOB_PROGRAM: VTYPE_STRING,
ND_SPINDLE_COUNT: VTYPE_INT,
}
......@@ -1842,7 +1842,7 @@ BEC_DEFAULTS = {
}
NDC_DEFAULTS = {
ND_OOB_PROGRAM: None,
ND_OOB_PROGRAM: "",
ND_SPINDLE_COUNT: 1,
}
......
......@@ -173,6 +173,10 @@ def UpgradeNDParams(ndparams):
if ndparams is None:
ndparams = {}
if (constants.ND_OOB_PROGRAM in ndparams and
ndparams[constants.ND_OOB_PROGRAM] is None):
# will be reset by the line below
del ndparams[constants.ND_OOB_PROGRAM]
return FillDict(constants.NDC_DEFAULTS, ndparams)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment