Commit a0eeb01a authored by Santi Raffa's avatar Santi Raffa Committed by Jose A. Lopes
Browse files

CLI: add parameters for private and secret OS parameters



Define the CLI parameters for private and OS parameters.
Signed-off-by: default avatarSanti Raffa <rsanti@google.com>
Reviewed-by: default avatarJose A. Lopes <jabolopes@google.com>
parent a5efec93
......@@ -165,6 +165,8 @@ __all__ = [
"ON_SECONDARY_OPT",
"OFFLINE_OPT",
"OSPARAMS_OPT",
"OSPARAMS_PRIVATE_OPT",
"OSPARAMS_SECRET_OPT",
"OS_OPT",
"OS_SIZE_OPT",
"OOB_TIMEOUT_OPT",
......@@ -948,6 +950,21 @@ OSPARAMS_OPT = cli_option("-O", "--os-parameters", dest="osparams",
type="keyval", default={},
help="OS parameters")
OSPARAMS_PRIVATE_OPT = cli_option("--os-parameters-private",
dest="osparams_private",
type="keyprivateval",
default=serializer.PrivateDict(),
help="Private OS parameters"
" (won't be logged)")
OSPARAMS_SECRET_OPT = cli_option("--os-parameters-secret",
dest="osparams_secret",
type="keyprivateval",
default=serializer.PrivateDict(),
help="Secret OS parameters (won't be logged or"
" saved; you must supply these for every"
" operation.)")
FORCE_VARIANT_OPT = cli_option("--force-variant", dest="force_variant",
action="store_true", default=False,
help="Force an unknown variant")
......
......@@ -1546,7 +1546,8 @@ commands = {
[FORCE_OPT, OS_OPT, FORCE_VARIANT_OPT, m_force_multi, m_node_opt,
m_pri_node_opt, m_sec_node_opt, m_clust_opt, m_inst_opt, m_node_tags_opt,
m_pri_node_tags_opt, m_sec_node_tags_opt, m_inst_tags_opt, SELECT_OS_OPT]
+ SUBMIT_OPTS + [DRY_RUN_OPT, PRIORITY_OPT, OSPARAMS_OPT],
+ SUBMIT_OPTS + [DRY_RUN_OPT, PRIORITY_OPT, OSPARAMS_OPT,
OSPARAMS_NOLOG_OPT, OSPARAMS_NOLOG_NOSAVE_OPT],
"[-f] <instance>", "Reinstall a stopped instance"),
"remove": (
RemoveInstance, ARGS_ONE_INSTANCE,
......@@ -1570,8 +1571,8 @@ commands = {
SetInstanceParams, ARGS_ONE_INSTANCE,
[BACKEND_OPT, DISK_OPT, FORCE_OPT, HVOPTS_OPT, NET_OPT] + SUBMIT_OPTS +
[DISK_TEMPLATE_OPT, SINGLE_NODE_OPT, OS_OPT, FORCE_VARIANT_OPT,
OSPARAMS_OPT, DRY_RUN_OPT, PRIORITY_OPT, NWSYNC_OPT, OFFLINE_INST_OPT,
ONLINE_INST_OPT, IGNORE_IPOLICY_OPT, RUNTIME_MEM_OPT,
OSPARAMS_OPT, OSPARAMS_NOLOG_OPT, DRY_RUN_OPT, PRIORITY_OPT, NWSYNC_OPT,
OFFLINE_INST_OPT, ONLINE_INST_OPT, IGNORE_IPOLICY_OPT, RUNTIME_MEM_OPT,
NOCONFLICTSCHECK_OPT, NEW_PRIMARY_OPT, HOTPLUG_OPT,
HOTPLUG_IF_POSSIBLE_OPT],
"<instance>", "Alters the parameters of an instance"),
......
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