New command group: replication

This commit is contained in:
Michael Klishin 2019-02-21 20:45:49 +03:00
parent 2b2e6e07c3
commit 6a368e24dc
7 changed files with 21 additions and 10 deletions

View File

@ -37,7 +37,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.CancelSyncQueueCommand do
def usage, do: "cancel_sync_queue [-p <vhost>] queue" def usage, do: "cancel_sync_queue [-p <vhost>] queue"
def help_section(), do: :queues def help_section(), do: :replication
def description(), do: "Instructs a synchronising mirrored queue to stop synchronising itself" def description(), do: "Instructs a synchronising mirrored queue to stop synchronising itself"

View File

@ -172,6 +172,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.HelpCommand do
:help -> 1 :help -> 1
:node_management -> 2 :node_management -> 2
:cluster_management -> 3 :cluster_management -> 3
:replication -> 3
:user_management -> 4 :user_management -> 4
:access_control -> 5 :access_control -> 5
:observability_and_health_checks -> 6 :observability_and_health_checks -> 6
@ -204,6 +205,8 @@ defmodule RabbitMQ.CLI.Ctl.Commands.HelpCommand do
"Users" "Users"
:cluster_management -> :cluster_management ->
"Cluster" "Cluster"
:replication ->
"Replication"
:node_management -> :node_management ->
"Nodes" "Nodes"
:queues -> :queues ->

View File

@ -37,7 +37,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.SyncQueueCommand do
def usage, do: "sync_queue [-p <vhost>] queue" def usage, do: "sync_queue [-p <vhost>] queue"
def help_section(), do: :queues def help_section(), do: :replication
def description(), do: "Instructs a mirrored queue with unsynchronised mirrors (follower replicas) to synchronise them" def description(), do: "Instructs a mirrored queue with unsynchronised mirrors (follower replicas) to synchronise them"

View File

@ -41,11 +41,13 @@ defmodule RabbitMQ.CLI.Queues.Commands.AddMemberCommand do
use RabbitMQ.CLI.DefaultOutput use RabbitMQ.CLI.DefaultOutput
def usage, do: "add_member [-p <vhost>] <queuename> <node>"
def help_section, do: :replication
def description, do: "Adds a quorum queue member (replica) for a queue on the given node." def description, do: "Adds a quorum queue member (replica) for a queue on the given node."
def banner([name, node], _) do def banner([name, node], _) do
"Adding member #{node} to quorum queue #{name} cluster..." "Adding member #{node} to quorum queue #{name} cluster..."
end end
def usage, do: "add_member [-p <vhost>] <queuename> <node>"
end end

View File

@ -41,11 +41,13 @@ defmodule RabbitMQ.CLI.Queues.Commands.DeleteMemberCommand do
use RabbitMQ.CLI.DefaultOutput use RabbitMQ.CLI.DefaultOutput
def usage, do: "delete_member [-p <vhost>] <queuename> <node>"
def help_section, do: :replication
def description, do: "Removes a quorum queue member (replica) for a queue on the given node." def description, do: "Removes a quorum queue member (replica) for a queue on the given node."
def banner([name, node], _) do def banner([name, node], _) do
"Deleting member #{node} from quorum queue #{name} cluster..." "Deleting member #{node} from quorum queue #{name} cluster..."
end end
def usage, do: "delete_member [-p <vhost>] <queuename> <node>"
end end

View File

@ -81,14 +81,16 @@ defmodule RabbitMQ.CLI.Queues.Commands.GrowCommand do
def formatter(), do: RabbitMQ.CLI.Formatters.Table def formatter(), do: RabbitMQ.CLI.Formatters.Table
def usage, do: "grow <node> <all | even> [--vhost-pattern <pattern>] [--queue-pattern <pattern>]"
def help_section, do: :cluster_management
def description, do: "Grows quorum queue clusters by adding a member (replica) to all matching quorum queues on the given node." def description, do: "Grows quorum queue clusters by adding a member (replica) to all matching quorum queues on the given node."
def banner([node, strategy], _) do def banner([node, strategy], _) do
"Growing #{strategy} quorum queues on #{node}..." "Growing #{strategy} quorum queues on #{node}..."
end end
def usage, do: "grow <node> <all | even> [--vhost-pattern <pattern>] [--queue-pattern <pattern>]"
# #
# Implementation # Implementation
# #

View File

@ -52,14 +52,16 @@ defmodule RabbitMQ.CLI.Queues.Commands.ShrinkCommand do
def formatter(), do: RabbitMQ.CLI.Formatters.Table def formatter(), do: RabbitMQ.CLI.Formatters.Table
def usage, do: "shrink <node> [--errors-only]"
def help_section, do: :cluster_management
def description, do: "Shrinks quorum queue clusters by removing any members (replicas) on the given node." def description, do: "Shrinks quorum queue clusters by removing any members (replicas) on the given node."
def banner([node], _) do def banner([node], _) do
"Shrinking quorum queues on #{node}..." "Shrinking quorum queues on #{node}..."
end end
def usage, do: "shrink <node> [--errors-only]"
# #
# Implementation # Implementation
# #