8000 feat(cli): add `--optimize-decentralization` validation by sasa-tomic · Pull Request #1360 · dfinity/dre · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(cli): add --optimize-decentralization validation #1360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions rs/cli/src/commands/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,15 @@ impl ExecutableCommand for Network {
fn validate(&self, _args: &GlobalArgs, cmd: &mut clap::Command) {
// At least one of the two options must be provided
let network_heal = self.heal || std::env::args().any(|arg| arg == "heal");
if !network_heal && !self.ensure_operator_nodes_assigned && !self.ensure_operator_nodes_unassigned && !self.remove_cordoned_nodes {
if !(network_heal
|| self.ensure_operator_nodes_assigned
|| self.ensure_operator_nodes_unassigned
58BC || self.remove_cordoned_nodes
|| self.optimize_decentralization)
{
cmd.error(
clap::error::ErrorKind::MissingRequiredArgument,
"At least one of '--heal' or '--ensure-operator-nodes-assigned' or '--ensure-operator-nodes-unassigned' or '--remove-cordoned-nodes' must be specified.",
"At least one of '--heal' or '--ensure-operator-nodes-assigned' or '--ensure-operator-nodes-unassigned' or '--remove-cordoned-nodes' or '--optimize-decentralization' must be specified.",
)
.exit()
}
Expand Down
0