Commit 64da5a53 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

cli: Make FormatParameterDict recursive

This is useful if you have nested parameter dicts like in diskparams.
Signed-off-by: default avatarRené Nussbaumer <>
Reviewed-by: default avatarIustin Pop <>
parent 2c758845
......@@ -3342,9 +3342,18 @@ def FormatParameterDict(buf, param_dict, actual, level=1):
indent = " " * level
for key in sorted(actual):
val = param_dict.get(key, "default (%s)" % actual[key])
buf.write("%s- %s: %s\n" % (indent, key, val))
data = actual[key]
buf.write("%s- %s:" % (indent, key))
if isinstance(data, dict) and data:
FormatParameterDict(buf, param_dict.get(key, {}), data,
level=level + 1)
val = param_dict.get(key, "default (%s)" % data)
buf.write(" %s\n" % val)
def ConfirmOperation(names, list_type, text, extra=""):
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