From 2764a478632329b1fe19bc3898c3d053a3bcf33e Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Sat, 1 Feb 2025 23:55:44 -0500 Subject: [PATCH] 0.22.0 --- CHANGELOG.md | 31 ++++++++++++++++++++++++++++-- Cargo.lock | 44 +++++++++++++++++++++---------------------- Cargo.toml | 2 +- src/main.rs | 20 ++++++++++++++------ src/tanzu_cli.rs | 22 +++++++++++++++++----- src/tanzu_commands.rs | 18 +++++++++++++----- 6 files changed, 96 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2316c86..d9ba6f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,35 @@ # rabbitmqadmin-ng Change Log -## v0.22.0 (in development) +## v0.23.0 (in development + +No (documented) changes yet. + + +## v0.22.0 (Feb 1, 2025) + +### Naming + +* `tanzu sds enable` was renamed to `tanzu sds enable_on_node`. + + This breaking change only applies to a command specific to + Tanzu RabbitMQ 4.1, a series currently in development. + +* `tanzu sds disable` was renamed to `tanzu sds disable_on_node`. + + This breaking change only applies to a command specific to + Tanzu RabbitMQ 4.1, a series currently in development. + +### Enhancements + +* `tanzu sds enable_cluster_wide` is a new command that disables SDS on all cluster nodes. + + This command is specific to Tanzu RabbitMQ 4.1, a series currently in development. + +* `tanzu sds disable_cluster_wide` is a new command that disables SDS on all cluster nodes. + + This command is specific to Tanzu RabbitMQ 4.1, a series currently in development. + -No (documented) changes yet ## v0.21.0 (Feb 1, 2025) diff --git a/Cargo.lock b/Cargo.lock index 8ba314d..91bfaa5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -184,7 +184,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.96", + "syn 2.0.98", "which", ] @@ -315,7 +315,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -351,7 +351,7 @@ dependencies = [ "nom", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -456,7 +456,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -937,7 +937,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1226,7 +1226,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1346,7 +1346,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1368,7 +1368,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1443,9 +1443,9 @@ dependencies = [ [[package]] name = "rabbitmq_http_client" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117198112e1ef7cde589769e379c80a64beb709518898a6ea8742efd198674b8" +checksum = "786e0e8f719ea99bf2ab54d2264e7b03ee2615ef02dd65a4cd0c74cd690ead2e" dependencies = [ "backtrace", "percent-encoding", @@ -1824,7 +1824,7 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1937,9 +1937,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.96" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -1963,7 +1963,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2062,7 +2062,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2073,7 +2073,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2380,7 +2380,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-shared", ] @@ -2415,7 +2415,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2698,7 +2698,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -2720,7 +2720,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2740,7 +2740,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -2769,5 +2769,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] diff --git a/Cargo.toml b/Cargo.toml index 40bc93e..2e5d51c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ reqwest = { version = "0.12.12", features = [ "__rustls", "rustls-tls-native-roots" ]} -rabbitmq_http_client = { version = "0.18.0", features = [ +rabbitmq_http_client = { version = "0.19.0", features = [ "core", "blocking", "tabled" diff --git a/src/main.rs b/src/main.rs index 0de132a..4619d91 100644 --- a/src/main.rs +++ b/src/main.rs @@ -552,16 +552,24 @@ fn dispatch_tanzu_subcommand( res_handler: &mut ResultHandler, ) -> ExitCode { match &pair { - ("sds", "status") => { - let result = tanzu_commands::sds_status(client, third_level_args); + ("sds", "status_on_node") => { + let result = tanzu_commands::sds_status_on_node(client, third_level_args); res_handler.schema_definition_sync_status_result(result) } - ("sds", "enable") => { - let result = tanzu_commands::sds_enable(client, third_level_args); + ("sds", "enable_cluster_wide") => { + let result = tanzu_commands::sds_enable_cluster_wide(client); res_handler.no_output_on_success(result) } - ("sds", "disable") => { - let result = tanzu_commands::sds_disable(client, third_level_args); + ("sds", "disable_cluster_wide") => { + let result = tanzu_commands::sds_disable_cluster_wide(client); + res_handler.no_output_on_success(result) + } + ("sds", "enable_on_node") => { + let result = tanzu_commands::sds_enable_on_node(client, third_level_args); + res_handler.no_output_on_success(result) + } + ("sds", "disable_on_node") => { + let result = tanzu_commands::sds_disable_on_node(client, third_level_args); res_handler.no_output_on_success(result) } ("wsr", "status") => { diff --git a/src/tanzu_cli.rs b/src/tanzu_cli.rs index 017e03d..ad9fc32 100644 --- a/src/tanzu_cli.rs +++ b/src/tanzu_cli.rs @@ -32,20 +32,32 @@ fn sds_group() -> Command { .subcommands(sds_subcommands()) } -fn sds_subcommands() -> [Command; 3] { - let status_cmd = Command::new("status") +fn sds_subcommands() -> [Command; 5] { + let status_cmd = Command::new("status_on_node") .long_about("Reports Schema Definition Sync (SDS) status on the given node") .arg(Arg::new("node").short('n').long("node").required(false)); - let disable_cmd = Command::new("disable") + let disable_on_node_cmd = Command::new("disable_on_node") .long_about("Stops Schema Definition Sync (SDS) on the given node") .arg(Arg::new("node").short('n').long("node").required(true)); - let enable_cmd = Command::new("enable") + let enable_on_node_cmd = Command::new("enable_on_node") .long_about("Resumes Schema Definition Sync (SDS) on the given node") .arg(Arg::new("node").short('n').long("node").required(true)); - [status_cmd, disable_cmd, enable_cmd] + let disable_cmd = Command::new("disable_cluster_wide") + .long_about("Stops Schema Definition Sync (SDS) on all cluster nodes"); + + let enable_cmd = Command::new("enable_cluster_wide") + .long_about("Resumes Schema Definition Sync (SDS) on all cluster nodes"); + + [ + status_cmd, + disable_on_node_cmd, + disable_cmd, + enable_on_node_cmd, + enable_cmd, + ] } fn wsr_subcommands() -> [Command; 1] { diff --git a/src/tanzu_commands.rs b/src/tanzu_commands.rs index a899317..95dc688 100644 --- a/src/tanzu_commands.rs +++ b/src/tanzu_commands.rs @@ -19,7 +19,7 @@ use clap::ArgMatches; use rabbitmq_http_client::blocking_api::Result as ClientResult; use rabbitmq_http_client::responses::{SchemaDefinitionSyncStatus, WarmStandbyReplicationStatus}; -pub fn sds_status( +pub fn sds_status_on_node( client: APIClient, command_args: &ArgMatches, ) -> ClientResult { @@ -27,14 +27,22 @@ pub fn sds_status( client.schema_definition_sync_status(node.map(|s| s.as_str())) } -pub fn sds_enable(client: APIClient, command_args: &ArgMatches) -> ClientResult<()> { +pub fn sds_enable_cluster_wide(client: APIClient) -> ClientResult<()> { + client.enable_schema_definition_sync() +} + +pub fn sds_disable_cluster_wide(client: APIClient) -> ClientResult<()> { + client.disable_schema_definition_sync() +} + +pub fn sds_enable_on_node(client: APIClient, command_args: &ArgMatches) -> ClientResult<()> { let node = command_args.get_one::("node").unwrap(); - client.enable_schema_definition_sync(node) + client.enable_schema_definition_sync_on_node(node) } -pub fn sds_disable(client: APIClient, command_args: &ArgMatches) -> ClientResult<()> { +pub fn sds_disable_on_node(client: APIClient, command_args: &ArgMatches) -> ClientResult<()> { let node = command_args.get_one::("node").unwrap(); - client.disable_schema_definition_sync(node) + client.disable_schema_definition_sync_on_node(node) } pub fn wsr_status(client: APIClient) -> ClientResult {