Add case
This commit is contained in:
		
							parent
							
								
									a875fe52ef
								
							
						
					
					
						commit
						34e791851c
					
				|  | @ -20,18 +20,20 @@ defmodule RabbitMQ.CLI.Ctl.Commands.ListDiscoveryPeersCommand do | ||||||
| 
 | 
 | ||||||
|   def scopes(), do: [:ctl, :diagnostics] |   def scopes(), do: [:ctl, :diagnostics] | ||||||
| 
 | 
 | ||||||
|   def formatter(), do: RabbitMQ.CLI.Formatters.Table |   def formatter(), do: RabbitMQ.CLI.Formatters.Erlang | ||||||
|   def merge_defaults(args, opts), do: {args, opts} |   def merge_defaults(args, opts), do: {args, opts} | ||||||
| 
 | 
 | ||||||
|   def scopes(), do: [:ctl, :diagnostics] |  | ||||||
| 
 |  | ||||||
|   def validate([_|_], _) do |   def validate([_|_], _) do | ||||||
|     {:validation_failure, :too_many_args} |     {:validation_failure, :too_many_args} | ||||||
|   end |   end | ||||||
|   def validate(_, _), do: :ok |   def validate(_, _), do: :ok | ||||||
| 
 | 
 | ||||||
|   def run([], %{node: node_name, timeout: timeout}) do |   def run([], %{node: node_name, timeout: timeout}) do | ||||||
|     :rabbit_misc.rpc_call(node_name, :rabbit_peer_discovery, :discover_cluster_nodes, [], timeout) |     nodes = :rabbit_misc.rpc_call(node_name, :rabbit_peer_discovery, :discover_cluster_nodes, [], timeout) | ||||||
|  |     case nodes do | ||||||
|  |       {:ok, {[], _} } -> "" | ||||||
|  |       result -> result | ||||||
|  |     end | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   def usage, do: "list_discovery_peers" |   def usage, do: "list_discovery_peers" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue