From 52dd8063ac0c85f418626ade7357157e21180ea7 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:41:12 +1000 Subject: [PATCH 1/6] Move container command to root --- .../src/commands/{network => }/container/logs.rs | 2 +- .../{network/container.rs => container/mod.rs} | 0 .../commands/{network => }/container/shared.rs | 0 .../src/commands/{network => }/container/start.rs | 2 +- .../src/commands/{network => }/container/stop.rs | 2 +- cmd/soroban-cli/src/commands/mod.rs | 11 ++++++++++- cmd/soroban-cli/src/commands/network/mod.rs | 15 ++++++++------- 7 files changed, 21 insertions(+), 11 deletions(-) rename cmd/soroban-cli/src/commands/{network => }/container/logs.rs (94%) rename cmd/soroban-cli/src/commands/{network/container.rs => container/mod.rs} (100%) rename cmd/soroban-cli/src/commands/{network => }/container/shared.rs (100%) rename cmd/soroban-cli/src/commands/{network => }/container/start.rs (99%) rename cmd/soroban-cli/src/commands/{network => }/container/stop.rs (95%) diff --git a/cmd/soroban-cli/src/commands/network/container/logs.rs b/cmd/soroban-cli/src/commands/container/logs.rs similarity index 94% rename from cmd/soroban-cli/src/commands/network/container/logs.rs rename to cmd/soroban-cli/src/commands/container/logs.rs index aaccffdde..85824b06c 100644 --- a/cmd/soroban-cli/src/commands/network/container/logs.rs +++ b/cmd/soroban-cli/src/commands/container/logs.rs @@ -1,7 +1,7 @@ use futures_util::TryStreamExt; use crate::{ - commands::{global, network::container::shared::Error as ConnectionError}, + commands::{container::shared::Error as ConnectionError, global}, print, }; diff --git a/cmd/soroban-cli/src/commands/network/container.rs b/cmd/soroban-cli/src/commands/container/mod.rs similarity index 100% rename from cmd/soroban-cli/src/commands/network/container.rs rename to cmd/soroban-cli/src/commands/container/mod.rs diff --git a/cmd/soroban-cli/src/commands/network/container/shared.rs b/cmd/soroban-cli/src/commands/container/shared.rs similarity index 100% rename from cmd/soroban-cli/src/commands/network/container/shared.rs rename to cmd/soroban-cli/src/commands/container/shared.rs diff --git a/cmd/soroban-cli/src/commands/network/container/start.rs b/cmd/soroban-cli/src/commands/container/start.rs similarity index 99% rename from cmd/soroban-cli/src/commands/network/container/start.rs rename to cmd/soroban-cli/src/commands/container/start.rs index 2f16d3c1e..6c5a5c291 100644 --- a/cmd/soroban-cli/src/commands/network/container/start.rs +++ b/cmd/soroban-cli/src/commands/container/start.rs @@ -9,8 +9,8 @@ use futures_util::TryStreamExt; use crate::{ commands::{ + container::shared::{Error as ConnectionError, Network}, global, - network::container::shared::{Error as ConnectionError, Network}, }, print, }; diff --git a/cmd/soroban-cli/src/commands/network/container/stop.rs b/cmd/soroban-cli/src/commands/container/stop.rs similarity index 95% rename from cmd/soroban-cli/src/commands/network/container/stop.rs rename to cmd/soroban-cli/src/commands/container/stop.rs index 77f674c46..6211c629f 100644 --- a/cmd/soroban-cli/src/commands/network/container/stop.rs +++ b/cmd/soroban-cli/src/commands/container/stop.rs @@ -1,5 +1,5 @@ use crate::{ - commands::{global, network::container::shared::Error as BollardConnectionError}, + commands::{container::shared::Error as BollardConnectionError, global}, print, }; diff --git a/cmd/soroban-cli/src/commands/mod.rs b/cmd/soroban-cli/src/commands/mod.rs index f1febae27..5d35b4339 100644 --- a/cmd/soroban-cli/src/commands/mod.rs +++ b/cmd/soroban-cli/src/commands/mod.rs @@ -7,6 +7,7 @@ use crate::config; pub mod cache; pub mod completion; +pub mod container; pub mod contract; pub mod env; pub mod events; @@ -113,6 +114,7 @@ impl Root { Cmd::Events(events) => events.run().await?, Cmd::Xdr(xdr) => xdr.run()?, Cmd::Network(network) => network.run(&self.global_args).await?, + Cmd::Container(container) => container.run(&self.global_args).await?, Cmd::Snapshot(snapshot) => snapshot.run(&self.global_args).await?, Cmd::Version(version) => version.run(), Cmd::Keys(id) => id.run(&self.global_args).await?, @@ -150,10 +152,14 @@ pub enum Cmd { #[command(subcommand)] Keys(keys::Cmd), - /// Start and configure networks + /// Configure connection to networks #[command(subcommand)] Network(network::Cmd), + /// Start local networks in containers + #[command(subcommand)] + Container(network::Cmd), + /// Download a snapshot of a ledger from an archive. #[command(subcommand)] Snapshot(snapshot::Cmd), @@ -201,6 +207,9 @@ pub enum Error { #[error(transparent)] Network(#[from] network::Error), + #[error(transparent)] + Container(#[from] container::Error), + #[error(transparent)] Snapshot(#[from] snapshot::Error), diff --git a/cmd/soroban-cli/src/commands/network/mod.rs b/cmd/soroban-cli/src/commands/network/mod.rs index a7519bc83..3b0cdeb82 100644 --- a/cmd/soroban-cli/src/commands/network/mod.rs +++ b/cmd/soroban-cli/src/commands/network/mod.rs @@ -5,7 +5,6 @@ use crate::rpc::{self}; use super::{config::locator, global}; pub mod add; -pub mod container; pub mod default; pub mod ls; pub mod rm; @@ -32,12 +31,12 @@ pub enum Cmd { /// By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: /// /// `docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable rpc,horizon` - Start(container::StartCmd), + Start(crate::commands::container::StartCmd), /// ⚠️ Deprecated: use `stellar container stop` instead /// /// Stop a network started with `network start`. For example, if you ran `stellar network start local`, you can use `stellar network stop local` to stop it. - Stop(container::StopCmd), + Stop(crate::commands::container::StopCmd), /// Set the default network that will be used on all commands. /// This allows you to skip `--network` or setting a environment variable, @@ -45,9 +44,11 @@ pub enum Cmd { #[command(name = "use")] Default(default::Cmd), + /// ⚠️ Deprecated: use `stellar container` instead + /// /// Commands to start, stop and get logs for a quickstart container #[command(subcommand)] - Container(container::Cmd), + Container(crate::commands::container::Cmd), } #[derive(thiserror::Error, Debug)] @@ -66,14 +67,14 @@ pub enum Error { // TODO: remove once `network start` is removed #[error(transparent)] - Start(#[from] container::start::Error), + Start(#[from] crate::commands::container::start::Error), // TODO: remove once `network stop` is removed #[error(transparent)] - Stop(#[from] container::stop::Error), + Stop(#[from] crate::commands::container::stop::Error), #[error(transparent)] - Container(#[from] container::Error), + Container(#[from] crate::commands::container::Error), #[error(transparent)] Config(#[from] locator::Error), From 33a03edd12be947f14d12920cd0d7bbc2d793ed5 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:44:07 +1000 Subject: [PATCH 2/6] update docs --- FULL_HELP_DOCS.md | 229 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 226 insertions(+), 3 deletions(-) diff --git a/FULL_HELP_DOCS.md b/FULL_HELP_DOCS.md index ae25453c6..1ed0186bc 100644 --- a/FULL_HELP_DOCS.md +++ b/FULL_HELP_DOCS.md @@ -47,7 +47,8 @@ Anything after the `--` double dash (the "slop") is parsed as arguments to the c * `events` — Watch the network for contract events * `env` — Prints the current environment variables or defaults to the stdout, in a format that can be used as .env file. Environment variables have precedency over defaults * `keys` — Create and manage identities including keys and addresses -* `network` — Start and configure networks +* `network` — Configure connection to networks +* `container` — Start local networks in containers * `snapshot` — Download a snapshot of a ledger from an archive * `tx` — Sign, Simulate, and Send transactions * `xdr` — Decode and encode XDR @@ -1090,7 +1091,7 @@ Set the default identity that will be used on all commands. This allows you to s ## `stellar network` -Start and configure networks +Configure connection to networks **Usage:** `stellar network ` @@ -1102,7 +1103,7 @@ Start and configure networks * `start` — ⚠️ Deprecated: use `stellar container start` instead * `stop` — ⚠️ Deprecated: use `stellar container stop` instead * `use` — Set the default network that will be used on all commands. This allows you to skip `--network` or setting a environment variable, while reusing this value in all commands that require it -* `container` — Commands to start, stop and get logs for a quickstart container +* `container` — ⚠️ Deprecated: use `stellar container` instead @@ -1230,6 +1231,8 @@ Set the default network that will be used on all commands. This allows you to sk ## `stellar network container` +⚠️ Deprecated: use `stellar container` instead + Commands to start, stop and get logs for a quickstart container **Usage:** `stellar network container ` @@ -1306,6 +1309,226 @@ Stop a network container started with `network container start` +## `stellar container` + +Start local networks in containers + +**Usage:** `stellar container ` + +###### **Subcommands:** + +* `add` — Add a new network +* `rm` — Remove a network +* `ls` — List networks +* `start` — ⚠️ Deprecated: use `stellar container start` instead +* `stop` — ⚠️ Deprecated: use `stellar container stop` instead +* `use` — Set the default network that will be used on all commands. This allows you to skip `--network` or setting a environment variable, while reusing this value in all commands that require it +* `container` — ⚠️ Deprecated: use `stellar container` instead + + + +## `stellar container add` + +Add a new network + +**Usage:** `stellar container add [OPTIONS] --rpc-url --network-passphrase ` + +###### **Arguments:** + +* `` — Name of network + +###### **Options:** + +* `--rpc-url ` — RPC server endpoint +* `--rpc-header ` — Optional header (e.g. API Key) to include in requests to the RPC +* `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server +* `--global` — Use global config +* `--config-dir ` — Location of config directory, default is "." + + + +## `stellar container rm` + +Remove a network + +**Usage:** `stellar container rm [OPTIONS] ` + +###### **Arguments:** + +* `` — Network to remove + +###### **Options:** + +* `--global` — Use global config +* `--config-dir ` — Location of config directory, default is "." + + + +## `stellar container ls` + +List networks + +**Usage:** `stellar container ls [OPTIONS]` + +###### **Options:** + +* `--global` — Use global config +* `--config-dir ` — Location of config directory, default is "." +* `-l`, `--long` — Get more info about the networks + + + +## `stellar container start` + +⚠️ Deprecated: use `stellar container start` instead + +Start network + +Start a container running a Stellar node, RPC, API, and friendbot (faucet). + +`stellar network start NETWORK [OPTIONS]` + +By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: + +`docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable rpc,horizon` + +**Usage:** `stellar container start [OPTIONS] ` + +###### **Arguments:** + +* `` — Network to start + + Possible values: `local`, `testnet`, `futurenet`, `pubnet` + + +###### **Options:** + +* `-d`, `--docker-host ` — Optional argument to override the default docker host. This is useful when you are using a non-standard docker host path for your Docker-compatible container runtime, e.g. Docker Desktop defaults to $HOME/.docker/run/docker.sock instead of /var/run/docker.sock +* `--name ` — Optional argument to specify the container name +* `-l`, `--limits ` — Optional argument to specify the limits for the local network only +* `-p`, `--ports-mapping ` — Argument to specify the `HOST_PORT:CONTAINER_PORT` mapping + + Default value: `8000:8000` +* `-t`, `--image-tag-override ` — Optional argument to override the default docker image tag for the given network +* `--protocol-version ` — Optional argument to specify the protocol version for the local network only + + + +## `stellar container stop` + +⚠️ Deprecated: use `stellar container stop` instead + +Stop a network started with `network start`. For example, if you ran `stellar network start local`, you can use `stellar network stop local` to stop it. + +**Usage:** `stellar container stop [OPTIONS] ` + +###### **Arguments:** + +* `` — Container to stop + +###### **Options:** + +* `-d`, `--docker-host ` — Optional argument to override the default docker host. This is useful when you are using a non-standard docker host path for your Docker-compatible container runtime, e.g. Docker Desktop defaults to $HOME/.docker/run/docker.sock instead of /var/run/docker.sock + + + +## `stellar container use` + +Set the default network that will be used on all commands. This allows you to skip `--network` or setting a environment variable, while reusing this value in all commands that require it + +**Usage:** `stellar container use [OPTIONS] ` + +###### **Arguments:** + +* `` — Set the default network name + +###### **Options:** + +* `--global` — Use global config +* `--config-dir ` — Location of config directory, default is "." + + + +## `stellar container container` + +⚠️ Deprecated: use `stellar container` instead + +Commands to start, stop and get logs for a quickstart container + +**Usage:** `stellar container container ` + +###### **Subcommands:** + +* `logs` — Get logs from a running network container +* `start` — Start a container running a Stellar node, RPC, API, and friendbot (faucet) +* `stop` — Stop a network container started with `network container start` + + + +## `stellar container container logs` + +Get logs from a running network container + +**Usage:** `stellar container container logs [OPTIONS] ` + +###### **Arguments:** + +* `` — Container to get logs from + +###### **Options:** + +* `-d`, `--docker-host ` — Optional argument to override the default docker host. This is useful when you are using a non-standard docker host path for your Docker-compatible container runtime, e.g. Docker Desktop defaults to $HOME/.docker/run/docker.sock instead of /var/run/docker.sock + + + +## `stellar container container start` + +Start a container running a Stellar node, RPC, API, and friendbot (faucet). + +`stellar network container start NETWORK [OPTIONS]` + +By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: + +`docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable rpc,horizon` + +**Usage:** `stellar container container start [OPTIONS] ` + +###### **Arguments:** + +* `` — Network to start + + Possible values: `local`, `testnet`, `futurenet`, `pubnet` + + +###### **Options:** + +* `-d`, `--docker-host ` — Optional argument to override the default docker host. This is useful when you are using a non-standard docker host path for your Docker-compatible container runtime, e.g. Docker Desktop defaults to $HOME/.docker/run/docker.sock instead of /var/run/docker.sock +* `--name ` — Optional argument to specify the container name +* `-l`, `--limits ` — Optional argument to specify the limits for the local network only +* `-p`, `--ports-mapping ` — Argument to specify the `HOST_PORT:CONTAINER_PORT` mapping + + Default value: `8000:8000` +* `-t`, `--image-tag-override ` — Optional argument to override the default docker image tag for the given network +* `--protocol-version ` — Optional argument to specify the protocol version for the local network only + + + +## `stellar container container stop` + +Stop a network container started with `network container start` + +**Usage:** `stellar container container stop [OPTIONS] ` + +###### **Arguments:** + +* `` — Container to stop + +###### **Options:** + +* `-d`, `--docker-host ` — Optional argument to override the default docker host. This is useful when you are using a non-standard docker host path for your Docker-compatible container runtime, e.g. Docker Desktop defaults to $HOME/.docker/run/docker.sock instead of /var/run/docker.sock + + + ## `stellar snapshot` Download a snapshot of a ledger from an archive From b9cb43c04588a33ecb5636ad47dddf84c5ec3e89 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:45:46 +1000 Subject: [PATCH 3/6] fix --- cmd/soroban-cli/src/commands/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/soroban-cli/src/commands/mod.rs b/cmd/soroban-cli/src/commands/mod.rs index 5d35b4339..f4344fb9d 100644 --- a/cmd/soroban-cli/src/commands/mod.rs +++ b/cmd/soroban-cli/src/commands/mod.rs @@ -158,7 +158,7 @@ pub enum Cmd { /// Start local networks in containers #[command(subcommand)] - Container(network::Cmd), + Container(container::Cmd), /// Download a snapshot of a ledger from an archive. #[command(subcommand)] From 83971b5d10fa8335abcf0e730b18b07ab4949239 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:46:01 +1000 Subject: [PATCH 4/6] docs --- FULL_HELP_DOCS.md | 154 ++-------------------------------------------- 1 file changed, 6 insertions(+), 148 deletions(-) diff --git a/FULL_HELP_DOCS.md b/FULL_HELP_DOCS.md index 1ed0186bc..f833e1995 100644 --- a/FULL_HELP_DOCS.md +++ b/FULL_HELP_DOCS.md @@ -1317,159 +1317,17 @@ Start local networks in containers ###### **Subcommands:** -* `add` — Add a new network -* `rm` — Remove a network -* `ls` — List networks -* `start` — ⚠️ Deprecated: use `stellar container start` instead -* `stop` — ⚠️ Deprecated: use `stellar container stop` instead -* `use` — Set the default network that will be used on all commands. This allows you to skip `--network` or setting a environment variable, while reusing this value in all commands that require it -* `container` — ⚠️ Deprecated: use `stellar container` instead - - - -## `stellar container add` - -Add a new network - -**Usage:** `stellar container add [OPTIONS] --rpc-url --network-passphrase ` - -###### **Arguments:** - -* `` — Name of network - -###### **Options:** - -* `--rpc-url ` — RPC server endpoint -* `--rpc-header ` — Optional header (e.g. API Key) to include in requests to the RPC -* `--network-passphrase ` — Network passphrase to sign the transaction sent to the rpc server -* `--global` — Use global config -* `--config-dir ` — Location of config directory, default is "." - - - -## `stellar container rm` - -Remove a network - -**Usage:** `stellar container rm [OPTIONS] ` - -###### **Arguments:** - -* `` — Network to remove - -###### **Options:** - -* `--global` — Use global config -* `--config-dir ` — Location of config directory, default is "." - - - -## `stellar container ls` - -List networks - -**Usage:** `stellar container ls [OPTIONS]` - -###### **Options:** - -* `--global` — Use global config -* `--config-dir ` — Location of config directory, default is "." -* `-l`, `--long` — Get more info about the networks - - - -## `stellar container start` - -⚠️ Deprecated: use `stellar container start` instead - -Start network - -Start a container running a Stellar node, RPC, API, and friendbot (faucet). - -`stellar network start NETWORK [OPTIONS]` - -By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: - -`docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable rpc,horizon` - -**Usage:** `stellar container start [OPTIONS] ` - -###### **Arguments:** - -* `` — Network to start - - Possible values: `local`, `testnet`, `futurenet`, `pubnet` - - -###### **Options:** - -* `-d`, `--docker-host ` — Optional argument to override the default docker host. This is useful when you are using a non-standard docker host path for your Docker-compatible container runtime, e.g. Docker Desktop defaults to $HOME/.docker/run/docker.sock instead of /var/run/docker.sock -* `--name ` — Optional argument to specify the container name -* `-l`, `--limits ` — Optional argument to specify the limits for the local network only -* `-p`, `--ports-mapping ` — Argument to specify the `HOST_PORT:CONTAINER_PORT` mapping - - Default value: `8000:8000` -* `-t`, `--image-tag-override ` — Optional argument to override the default docker image tag for the given network -* `--protocol-version ` — Optional argument to specify the protocol version for the local network only - - - -## `stellar container stop` - -⚠️ Deprecated: use `stellar container stop` instead - -Stop a network started with `network start`. For example, if you ran `stellar network start local`, you can use `stellar network stop local` to stop it. - -**Usage:** `stellar container stop [OPTIONS] ` - -###### **Arguments:** - -* `` — Container to stop - -###### **Options:** - -* `-d`, `--docker-host ` — Optional argument to override the default docker host. This is useful when you are using a non-standard docker host path for your Docker-compatible container runtime, e.g. Docker Desktop defaults to $HOME/.docker/run/docker.sock instead of /var/run/docker.sock - - - -## `stellar container use` - -Set the default network that will be used on all commands. This allows you to skip `--network` or setting a environment variable, while reusing this value in all commands that require it - -**Usage:** `stellar container use [OPTIONS] ` - -###### **Arguments:** - -* `` — Set the default network name - -###### **Options:** - -* `--global` — Use global config -* `--config-dir ` — Location of config directory, default is "." - - - -## `stellar container container` - -⚠️ Deprecated: use `stellar container` instead - -Commands to start, stop and get logs for a quickstart container - -**Usage:** `stellar container container ` - -###### **Subcommands:** - * `logs` — Get logs from a running network container * `start` — Start a container running a Stellar node, RPC, API, and friendbot (faucet) * `stop` — Stop a network container started with `network container start` -## `stellar container container logs` +## `stellar container logs` Get logs from a running network container -**Usage:** `stellar container container logs [OPTIONS] ` +**Usage:** `stellar container logs [OPTIONS] ` ###### **Arguments:** @@ -1481,7 +1339,7 @@ Get logs from a running network container -## `stellar container container start` +## `stellar container start` Start a container running a Stellar node, RPC, API, and friendbot (faucet). @@ -1491,7 +1349,7 @@ By default, when starting a testnet container, without any optional arguments, i `docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable rpc,horizon` -**Usage:** `stellar container container start [OPTIONS] ` +**Usage:** `stellar container start [OPTIONS] ` ###### **Arguments:** @@ -1513,11 +1371,11 @@ By default, when starting a testnet container, without any optional arguments, i -## `stellar container container stop` +## `stellar container stop` Stop a network container started with `network container start` -**Usage:** `stellar container container stop [OPTIONS] ` +**Usage:** `stellar container stop [OPTIONS] ` ###### **Arguments:** From b2424b2701e1352ee5532bee4232f12a7fd9ee75 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:48:04 +1000 Subject: [PATCH 5/6] fix --- cmd/soroban-cli/src/commands/container/mod.rs | 4 ++-- cmd/soroban-cli/src/commands/network/mod.rs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/soroban-cli/src/commands/container/mod.rs b/cmd/soroban-cli/src/commands/container/mod.rs index d14dc72e4..08203095d 100644 --- a/cmd/soroban-cli/src/commands/container/mod.rs +++ b/cmd/soroban-cli/src/commands/container/mod.rs @@ -16,13 +16,13 @@ pub enum Cmd { Logs(logs::Cmd), /// Start a container running a Stellar node, RPC, API, and friendbot (faucet). /// - /// `stellar network container start NETWORK [OPTIONS]` + /// `stellar container start NETWORK [OPTIONS]` /// /// By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: /// /// `docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable rpc,horizon` Start(start::Cmd), - /// Stop a network container started with `network container start`. + /// Stop a network container started with `stellar container start`. Stop(stop::Cmd), } diff --git a/cmd/soroban-cli/src/commands/network/mod.rs b/cmd/soroban-cli/src/commands/network/mod.rs index 3b0cdeb82..5cc2acc43 100644 --- a/cmd/soroban-cli/src/commands/network/mod.rs +++ b/cmd/soroban-cli/src/commands/network/mod.rs @@ -104,12 +104,14 @@ impl Cmd { // TODO Remove this once `network start` is removed Cmd::Start(cmd) => { - eprintln!("⚠️ Warning: `network start` has been deprecated. Use `network container start` instead"); + eprintln!("⚠️ Warning: `network start` has been deprecated. Use `container start` instead"); cmd.run(global_args).await?; } // TODO Remove this once `network stop` is removed Cmd::Stop(cmd) => { - println!("⚠️ Warning: `network stop` has been deprecated. Use `network container stop` instead"); + println!( + "⚠️ Warning: `network stop` has been deprecated. Use `container stop` instead" + ); cmd.run(global_args).await?; } }; From aaee63610325c9fa98c7a71bf969a083708ab9d9 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 7 Nov 2024 20:20:54 +1000 Subject: [PATCH 6/6] update docs --- FULL_HELP_DOCS.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FULL_HELP_DOCS.md b/FULL_HELP_DOCS.md index f833e1995..3084a2838 100644 --- a/FULL_HELP_DOCS.md +++ b/FULL_HELP_DOCS.md @@ -1241,7 +1241,7 @@ Commands to start, stop and get logs for a quickstart container * `logs` — Get logs from a running network container * `start` — Start a container running a Stellar node, RPC, API, and friendbot (faucet) -* `stop` — Stop a network container started with `network container start` +* `stop` — Stop a network container started with `stellar container start` @@ -1265,7 +1265,7 @@ Get logs from a running network container Start a container running a Stellar node, RPC, API, and friendbot (faucet). -`stellar network container start NETWORK [OPTIONS]` +`stellar container start NETWORK [OPTIONS]` By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: @@ -1295,7 +1295,7 @@ By default, when starting a testnet container, without any optional arguments, i ## `stellar network container stop` -Stop a network container started with `network container start` +Stop a network container started with `stellar container start` **Usage:** `stellar network container stop [OPTIONS] ` @@ -1319,7 +1319,7 @@ Start local networks in containers * `logs` — Get logs from a running network container * `start` — Start a container running a Stellar node, RPC, API, and friendbot (faucet) -* `stop` — Stop a network container started with `network container start` +* `stop` — Stop a network container started with `stellar container start` @@ -1343,7 +1343,7 @@ Get logs from a running network container Start a container running a Stellar node, RPC, API, and friendbot (faucet). -`stellar network container start NETWORK [OPTIONS]` +`stellar container start NETWORK [OPTIONS]` By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: @@ -1373,7 +1373,7 @@ By default, when starting a testnet container, without any optional arguments, i ## `stellar container stop` -Stop a network container started with `network container start` +Stop a network container started with `stellar container start` **Usage:** `stellar container stop [OPTIONS] `