Skip to content

Commit

Permalink
refactor: clean cli commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Sopena Ballesteros committed Oct 1, 2024
1 parent e9dbb56 commit c5bc5b6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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_PATH> "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" <VALUES_FILE_PATH> "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" <VALUES_PATH> ... "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" <VALUES_FILE_PATH> "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" <VALUES_PATH> ... "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 <VALUE> "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 <FORMAT> "Output format. If missing it will print output data in human redeable (tabular) format").value_parser(["json"]))
// .arg(arg!(-n --name <VALUE> "Configuration name"))
Expand All @@ -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)
Expand All @@ -497,9 +497,9 @@ pub fn subcommand_apply_image(/* hsm_group: Option<&String> */) -> Command {
.arg(arg!(-P --"ansible-passthrough" <VALUE> "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 <FORMAT> "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)
Expand All @@ -511,7 +511,7 @@ pub fn subcommand_apply_template(/* hsm_group: Option<&String> */) -> Command {
.default_value("reboot"),
)
.arg(arg!(-l --"limit" <VALUE> "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")
Expand Down

0 comments on commit c5bc5b6

Please sign in to comment.