Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions crates/icp-cli/src/commands/deploy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ pub(crate) struct DeployArgs {
#[arg(long, short, default_value = "auto", value_parser = ["auto", "install", "reinstall", "upgrade"])]
pub(crate) mode: String,

/// The subnet id to use for the canisters being deployed.
/// The subnet to use for the canisters being deployed.
#[clap(long)]
pub(crate) subnet_id: Option<Principal>,
pub(crate) subnet: Option<Principal>,

/// One or more controllers for the canisters being deployed. Repeat `--controller` to specify multiple.
#[arg(long)]
Expand Down Expand Up @@ -146,7 +146,7 @@ pub(crate) async fn exec(ctx: &Context, args: &DeployArgs) -> Result<(), Command

quiet: false,
cycles: args.cycles,
subnet: args.subnet_id,
subnet: args.subnet,
},
)
.await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/icp-cli/tests/canister_delete_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn canister_delete() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down
2 changes: 1 addition & 1 deletion crates/icp-cli/tests/canister_info_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn canister_status() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down
8 changes: 4 additions & 4 deletions crates/icp-cli/tests/canister_settings_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn canister_settings_update_controllers() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down Expand Up @@ -363,7 +363,7 @@ fn canister_settings_update_log_visibility() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down Expand Up @@ -678,7 +678,7 @@ fn canister_settings_update_miscellaneous() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--cycles",
&format!("{}", 120 * TRILLION), // 120 TCYCLES because compute allocation is expensive
Expand Down Expand Up @@ -801,7 +801,7 @@ fn canister_settings_update_environment_variables() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down
2 changes: 1 addition & 1 deletion crates/icp-cli/tests/canister_start_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn canister_start() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down
2 changes: 1 addition & 1 deletion crates/icp-cli/tests/canister_status_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn canister_status() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down
2 changes: 1 addition & 1 deletion crates/icp-cli/tests/canister_stop_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn canister_stop() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down
10 changes: 5 additions & 5 deletions crates/icp-cli/tests/deploy_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn deploy_empty() {
// Deploy project
ctx.icp()
.current_dir(&project_dir)
.args(["deploy", "--subnet-id", common::SUBNET_ID])
.args(["deploy", "--subnet", common::SUBNET_ID])
.assert()
.success();
}
Expand All @@ -55,7 +55,7 @@ fn deploy_canister_not_found() {
// Deploy project
ctx.icp()
.current_dir(&project_dir)
.args(["deploy", "my-canister", "--subnet-id", common::SUBNET_ID])
.args(["deploy", "my-canister", "--subnet", common::SUBNET_ID])
.assert()
.failure()
.stderr(eq("Error: project does not contain a canister named 'my-canister'").trim());
Expand Down Expand Up @@ -101,7 +101,7 @@ async fn deploy() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down Expand Up @@ -166,7 +166,7 @@ async fn deploy_twice_should_succeed() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand All @@ -179,7 +179,7 @@ async fn deploy_twice_should_succeed() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down
4 changes: 2 additions & 2 deletions crates/icp-cli/tests/network_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ fn deploy_to_other_projects_network() {
.current_dir(&projb)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"environment-1",
Expand All @@ -194,7 +194,7 @@ fn deploy_to_other_projects_network() {
.current_dir(&projb)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"environment-1",
Expand Down
2 changes: 1 addition & 1 deletion crates/icp-cli/tests/project_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ fn glob_path() {
// // Invoke build
// ctx.icp()
// .current_dir(project_dir)
// .args(["deploy", "--subnet-id", common::SUBNET_ID])
// .args(["deploy", "--subnet", common::SUBNET_ID])
// .assert()
// .failure()
// .stderr(eq("Error: cannot redefine the 'ic' network; the network path 'networks/ic' is invalid").trim());
Expand Down
6 changes: 3 additions & 3 deletions crates/icp-cli/tests/sync_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn sync_adapter_script_single() {
.args([
"--debug",
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down Expand Up @@ -126,7 +126,7 @@ fn sync_adapter_script_multiple() {
.args([
"--debug",
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down Expand Up @@ -204,7 +204,7 @@ async fn sync_adapter_static_assets() {
.current_dir(&project_dir)
.args([
"deploy",
"--subnet-id",
"--subnet",
common::SUBNET_ID,
"--environment",
"my-environment",
Expand Down
2 changes: 1 addition & 1 deletion docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ Deploy a project to an environment

Possible values: `auto`, `install`, `reinstall`, `upgrade`

* `--subnet-id <SUBNET_ID>` — The subnet id to use for the canisters being deployed
* `--subnet <SUBNET>` — The subnet to use for the canisters being deployed
* `--controller <CONTROLLER>` — One or more controllers for the canisters being deployed. Repeat `--controller` to specify multiple
* `--cycles <CYCLES>` — Cycles to fund canister creation (in cycles)

Expand Down