From c5bc5b60222bfcb6927a392e93d9a3d2b4f444e3 Mon Sep 17 00:00:00 2001 From: Manuel Sopena Ballesteros Date: Tue, 1 Oct 2024 14:54:20 +0200 Subject: [PATCH] refactor: clean cli commands --- src/cli/build.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cli/build.rs b/src/cli/build.rs index c88be858..70f7630f 100644 --- a/src/cli/build.rs +++ b/src/cli/build.rs @@ -78,9 +78,9 @@ pub fn build_cli() -> Command { .about("Make changes to Shasta system") .subcommand(subcommand_apply_hw_configuration()) .subcommand(subcommand_apply_configuration()) - .subcommand(subcommand_apply_template()) - .subcommand(subcommand_apply_image(/* hsm_group */)) - .subcommand(subcommand_apply_cluster(/* hsm_group */)) + // .subcommand(subcommand_apply_template()) + // .subcommand(subcommand_apply_image(/* hsm_group */)) + // .subcommand(subcommand_apply_cluster(/* hsm_group */)) .subcommand(subcommand_apply_sat_file(/* hsm_group */)) .subcommand(Command::new("boot") .visible_alias("b") @@ -460,8 +460,8 @@ pub fn subcommand_apply_configuration() -> Command { .about("DEPRECATED - Please use 'manta apply sat-file' command instead.\nCreate a CFS configuration") // .about("Create a CFS configuration") .arg(arg!(-t --"sat-template-file" "SAT file with CFS configuration, CFS image and BOS session template details to create a cluster. The SAT file can be a jinja2 template, if this is the case, then a values file must be provided.").value_parser(value_parser!(PathBuf)).required(true)) - .arg(arg!(-f --"values-file" "WIP - If the SAT file is a jinja2 template, then variables values can be expanded using this values file.").value_parser(value_parser!(PathBuf))) - .arg(arg!(-V --"values" ... "WIP - If the SAT file is a jinja2 template, then variables values can be expanded using these values. Overwrites values-file if both provided.")) + .arg(arg!(-f --"values-file" "If the SAT file is a jinja2 template, then variables values can be expanded using this values file.").value_parser(value_parser!(PathBuf))) + .arg(arg!(-V --"values" ... "If the SAT file is a jinja2 template, then variables values can be expanded using these values. Overwrites values-file if both provided.")) // .arg(arg!(-t --tag "Tag added as a suffix in the CFS configuration name and CFS session name. If missing, then a default value will be used with timestamp")) .arg(arg!(-o --output "Output format. If missing it will print output data in human redeable (tabular) format").value_parser(["json"])) // .arg(arg!(-n --name "Configuration name")) @@ -476,7 +476,7 @@ pub fn subcommand_apply_configuration() -> Command { /// Returns: the image id. /// First creates a CFS configuration (configuration name is autogenerated). Then creates a CFS session /// of 'target image' (session name is autogenerated). -pub fn subcommand_apply_image(/* hsm_group: Option<&String> */) -> Command { +/* pub fn subcommand_apply_image(/* hsm_group: Option<&String> */) -> Command { Command::new("image") .visible_aliases(["i", "img", "imag"]) .arg_required_else_help(true) @@ -497,9 +497,9 @@ pub fn subcommand_apply_image(/* hsm_group: Option<&String> */) -> Command { .arg(arg!(-P --"ansible-passthrough" "Additional parameters that are added to all Ansible calls for the session. This field is currently limited to the following Ansible parameters: \"--extra-vars\", \"--forks\", \"--skip-tags\", \"--start-at-task\", and \"--tags\". WARNING: Parameters passed to Ansible in this way should be used with caution. State will not be recorded for components when using these flags to avoid incorrect reporting of partial playbook runs.").allow_hyphen_values(true)) .arg(arg!(-w --"watch-logs" "Watch logs. Hooks stdout to see container running ansible scripts")) .arg(arg!(-o --output "Output format. If missing it will print output data in human redeable (tabular) format").value_parser(["json"])) -} +} */ -pub fn subcommand_apply_template(/* hsm_group: Option<&String> */) -> Command { +/* pub fn subcommand_apply_template(/* hsm_group: Option<&String> */) -> Command { Command::new("template") .visible_aliases(["t", "temp"]) .arg_required_else_help(true) @@ -511,7 +511,7 @@ pub fn subcommand_apply_template(/* hsm_group: Option<&String> */) -> Command { .default_value("reboot"), ) .arg(arg!(-l --"limit" "Comma separated list of nodes or HSM groups to apply the BOS sessiontemplate. If missing, default targets in BOS sessiontemplate will apply.")) -} +} */ pub fn subcommand_apply_cluster(/* hsm_group: Option<&String> */) -> Command { Command::new("cluster")