Skip to content

Commit 2764a47

Browse files
0.22.0
1 parent 788b1af commit 2764a47

File tree

6 files changed

+96
-41
lines changed

6 files changed

+96
-41
lines changed

CHANGELOG.md

+29-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
11
# rabbitmqadmin-ng Change Log
22

3-
## v0.22.0 (in development)
3+
## v0.23.0 (in development
4+
5+
No (documented) changes yet.
6+
7+
8+
## v0.22.0 (Feb 1, 2025)
9+
10+
### Naming
11+
12+
* `tanzu sds enable` was renamed to `tanzu sds enable_on_node`.
13+
14+
This breaking change only applies to a command specific to
15+
Tanzu RabbitMQ 4.1, a series currently in development.
16+
17+
* `tanzu sds disable` was renamed to `tanzu sds disable_on_node`.
18+
19+
This breaking change only applies to a command specific to
20+
Tanzu RabbitMQ 4.1, a series currently in development.
21+
22+
### Enhancements
23+
24+
* `tanzu sds enable_cluster_wide` is a new command that disables SDS on all cluster nodes.
25+
26+
This command is specific to Tanzu RabbitMQ 4.1, a series currently in development.
27+
28+
* `tanzu sds disable_cluster_wide` is a new command that disables SDS on all cluster nodes.
29+
30+
This command is specific to Tanzu RabbitMQ 4.1, a series currently in development.
31+
432

5-
No (documented) changes yet
633

734
## v0.21.0 (Feb 1, 2025)
835

Cargo.lock

+22-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ reqwest = { version = "0.12.12", features = [
1717
"__rustls",
1818
"rustls-tls-native-roots"
1919
]}
20-
rabbitmq_http_client = { version = "0.18.0", features = [
20+
rabbitmq_http_client = { version = "0.19.0", features = [
2121
"core",
2222
"blocking",
2323
"tabled"

src/main.rs

+14-6
Original file line numberDiff line numberDiff line change
@@ -552,16 +552,24 @@ fn dispatch_tanzu_subcommand(
552552
res_handler: &mut ResultHandler,
553553
) -> ExitCode {
554554
match &pair {
555-
("sds", "status") => {
556-
let result = tanzu_commands::sds_status(client, third_level_args);
555+
("sds", "status_on_node") => {
556+
let result = tanzu_commands::sds_status_on_node(client, third_level_args);
557557
res_handler.schema_definition_sync_status_result(result)
558558
}
559-
("sds", "enable") => {
560-
let result = tanzu_commands::sds_enable(client, third_level_args);
559+
("sds", "enable_cluster_wide") => {
560+
let result = tanzu_commands::sds_enable_cluster_wide(client);
561561
res_handler.no_output_on_success(result)
562562
}
563-
("sds", "disable") => {
564-
let result = tanzu_commands::sds_disable(client, third_level_args);
563+
("sds", "disable_cluster_wide") => {
564+
let result = tanzu_commands::sds_disable_cluster_wide(client);
565+
res_handler.no_output_on_success(result)
566+
}
567+
("sds", "enable_on_node") => {
568+
let result = tanzu_commands::sds_enable_on_node(client, third_level_args);
569+
res_handler.no_output_on_success(result)
570+
}
571+
("sds", "disable_on_node") => {
572+
let result = tanzu_commands::sds_disable_on_node(client, third_level_args);
565573
res_handler.no_output_on_success(result)
566574
}
567575
("wsr", "status") => {

src/tanzu_cli.rs

+17-5
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,32 @@ fn sds_group() -> Command {
3232
.subcommands(sds_subcommands())
3333
}
3434

35-
fn sds_subcommands() -> [Command; 3] {
36-
let status_cmd = Command::new("status")
35+
fn sds_subcommands() -> [Command; 5] {
36+
let status_cmd = Command::new("status_on_node")
3737
.long_about("Reports Schema Definition Sync (SDS) status on the given node")
3838
.arg(Arg::new("node").short('n').long("node").required(false));
3939

40-
let disable_cmd = Command::new("disable")
40+
let disable_on_node_cmd = Command::new("disable_on_node")
4141
.long_about("Stops Schema Definition Sync (SDS) on the given node")
4242
.arg(Arg::new("node").short('n').long("node").required(true));
4343

44-
let enable_cmd = Command::new("enable")
44+
let enable_on_node_cmd = Command::new("enable_on_node")
4545
.long_about("Resumes Schema Definition Sync (SDS) on the given node")
4646
.arg(Arg::new("node").short('n').long("node").required(true));
4747

48-
[status_cmd, disable_cmd, enable_cmd]
48+
let disable_cmd = Command::new("disable_cluster_wide")
49+
.long_about("Stops Schema Definition Sync (SDS) on all cluster nodes");
50+
51+
let enable_cmd = Command::new("enable_cluster_wide")
52+
.long_about("Resumes Schema Definition Sync (SDS) on all cluster nodes");
53+
54+
[
55+
status_cmd,
56+
disable_on_node_cmd,
57+
disable_cmd,
58+
enable_on_node_cmd,
59+
enable_cmd,
60+
]
4961
}
5062

5163
fn wsr_subcommands() -> [Command; 1] {

src/tanzu_commands.rs

+13-5
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,30 @@ use clap::ArgMatches;
1919
use rabbitmq_http_client::blocking_api::Result as ClientResult;
2020
use rabbitmq_http_client::responses::{SchemaDefinitionSyncStatus, WarmStandbyReplicationStatus};
2121

22-
pub fn sds_status(
22+
pub fn sds_status_on_node(
2323
client: APIClient,
2424
command_args: &ArgMatches,
2525
) -> ClientResult<SchemaDefinitionSyncStatus> {
2626
let node = command_args.get_one::<String>("node");
2727
client.schema_definition_sync_status(node.map(|s| s.as_str()))
2828
}
2929

30-
pub fn sds_enable(client: APIClient, command_args: &ArgMatches) -> ClientResult<()> {
30+
pub fn sds_enable_cluster_wide(client: APIClient) -> ClientResult<()> {
31+
client.enable_schema_definition_sync()
32+
}
33+
34+
pub fn sds_disable_cluster_wide(client: APIClient) -> ClientResult<()> {
35+
client.disable_schema_definition_sync()
36+
}
37+
38+
pub fn sds_enable_on_node(client: APIClient, command_args: &ArgMatches) -> ClientResult<()> {
3139
let node = command_args.get_one::<String>("node").unwrap();
32-
client.enable_schema_definition_sync(node)
40+
client.enable_schema_definition_sync_on_node(node)
3341
}
3442

35-
pub fn sds_disable(client: APIClient, command_args: &ArgMatches) -> ClientResult<()> {
43+
pub fn sds_disable_on_node(client: APIClient, command_args: &ArgMatches) -> ClientResult<()> {
3644
let node = command_args.get_one::<String>("node").unwrap();
37-
client.disable_schema_definition_sync(node)
45+
client.disable_schema_definition_sync_on_node(node)
3846
}
3947

4048
pub fn wsr_status(client: APIClient) -> ClientResult<WarmStandbyReplicationStatus> {

0 commit comments

Comments
 (0)