Skip to content

Commit

Permalink
fix: add motivation argument to remove API BN command (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
r-birkner committed Jun 21, 2024
1 parent b48ce72 commit c833710
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion rs/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,13 @@ pub mod api_boundary_nodes {

/// Decommission a set of API BNs and turn them again in unassigned nodes
Remove {
/// Node IDs to turn into API BNs
/// Node IDs of API BNs that should be turned into unassigned nodes again
#[clap(long, num_args(1..), required = true)]
nodes: Vec<PrincipalId>,

/// Motivation for removing the API BNs
#[clap(short, long, aliases = ["summary"], required = true)]
motivation: Option<String>,
},
}
}
Expand Down
4 changes: 2 additions & 2 deletions rs/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,15 +418,15 @@ async fn async_main() -> Result<(), anyhow::Error> {
.await?;
Ok(())
}
cli::api_boundary_nodes::Commands::Remove { nodes } => {
cli::api_boundary_nodes::Commands::Remove { nodes, motivation } => {
runner_instance
.ic_admin
.propose_run(
ic_admin::ProposeCommand::RemoveApiBoundaryNodes { nodes: nodes.to_vec() },
ic_admin::ProposeOptions {
title: Some(format!("Remove {} API boundary node(s)", nodes.clone().len())),
summary: Some(format!("Remove {} API boundary node(s)", nodes.clone().len())),
motivation: None,
motivation: motivation.clone(),
},
dry_run,
)
Expand Down

0 comments on commit c833710

Please sign in to comment.