Commit Graph

1174 Commits

Author SHA1 Message Date
Daniil Fedotov dcd831ec99 Correct IO device name 2016-11-04 11:12:14 +00:00
Daniil Fedotov 14d82eabdc Refactor error reporting to allow commands specify formatter 2016-11-04 11:11:03 +00:00
Daniil Fedotov 3f4abba717 Command specific formatters 2016-11-03 18:10:18 +00:00
Daniil Fedotov cb3e54d8d8 Table formatter 2016-10-31 18:07:24 +00:00
Michael Klishin 74cb3a2b53 diag, diagnostic => diagnostics 2016-10-12 01:07:40 +03:00
Daniil Fedotov 70b867e908 Naming 2016-10-07 14:57:10 +01:00
Daniil Fedotov 41f38e29f8 Make read-only commands part of the rabbitmq-diag tool 2016-10-07 14:36:54 +01:00
Michael Klishin e1de90218c Merge pull request #104 from rabbitmq/rabbitmq-cli-101
Operator policies commands
2016-09-08 15:35:56 +04:00
Daniil Fedotov 599cede1df Convert error_string char list to string 2016-09-08 11:03:08 +01:00
Daniil Fedotov 3ac39162be Operator policies commands 2016-09-08 11:02:21 +01:00
Daniil Fedotov fe3e83ec50 Fixing some tests 2016-09-07 12:46:47 +01:00
Michael Klishin 4a277f1fdd A bit of docs 2016-09-05 13:29:11 +03:00
Michael Klishin 64ee6dfaf2 Wording 2016-09-05 13:06:45 +03:00
Michael Klishin b65d8649cd Cosmetics 2016-09-05 12:47:59 +03:00
Michael Klishin 59a57a8d37 Merge branch 'master' into rabbitmq-cli-90 2016-09-05 12:44:18 +03:00
Daniil Fedotov a7fe88e74c Example json formatter. Remove IO.puts from commands 2016-08-23 14:28:07 +01:00
Daniil Fedotov 57550182e1 Specific output tests 2016-08-22 15:05:17 +01:00
Daniil Fedotov 6d2208063f Write to file using file printer 2016-08-22 14:19:15 +01:00
Daniil Fedotov c88eb090f3 File printer 2016-08-22 14:13:38 +01:00
Daniil Fedotov 4c13a51ac8 Reworking command outputs 2016-08-22 12:58:37 +01:00
Daniil Fedotov 616476cc66 Remove duplicate require_rabbit function 2016-08-18 17:55:29 +01:00
Daniil Fedotov 0da30bd1d1 Help command return list of strings instead of printing them\ 2016-08-18 17:38:49 +01:00
Daniil Fedotov 35fc3d12cd Default output formatting and exit code selection. Inspect printer 2016-08-18 15:35:49 +01:00
Michael Klishin b154b998ca Make sure rabbit_event is functional
It will be required as of server#500.
2016-08-18 12:09:27 +03:00
Daniil Fedotov 4b25f8ab18 Add rabbit plugins to path when requiring rabbit to be loaded 2016-08-17 17:06:15 +01:00
Andrew Bruce 19f0ba94d3 Inline default_opts
[#127359637]
2016-08-15 15:09:12 +01:00
Andrew Bruce 541ad4249c Fix merge_defaults implementations
...and don't default inside run methods.

Defaults must go on left-hand-side of `Map.merge`, or they'll clobber
user-defined settings.

Remove some unnecessary pattern matching.

Issue #92

[#127359637]
2016-08-15 14:21:15 +01:00
Michael Klishin 4e45a52dd4 Fix an IO.puts/1 line ported from io:format/2 too literally 2016-08-14 08:37:32 +03:00
Michael Klishin 49e9cb2909 pong and pang are atoms 2016-08-14 08:16:44 +03:00
Michael Klishin 1d911b4350 Delete a duplicate fn head 2016-08-14 08:07:19 +03:00
Michael Klishin b57e8e16cc Don't rely on rabbit_control_main; coerce node names to atoms
`rabbit_control_main` is going away due to the very existence of
these new CLI tools.
2016-08-12 04:46:26 +03:00
Michael Klishin cb209d834d Merge branch 'master' into rabbitmq-cli-rename-cluster-node-command
Conflicts:
	lib/rabbitmqctl.ex
2016-08-12 04:36:51 +03:00
Michael Klishin 508a906bf9 Wording, add aliases to UpdateClusterNodesCommand 2016-08-12 02:34:43 +03:00
Michael Klishin 17773fcd1f Merge branch 'master' into rabbitmq-cli-update-cluster-nodes 2016-08-12 01:56:12 +03:00
Michael Klishin 0e8ab49937 Brush up tests, support both "disc" and "disk"
as the current `rabbitmqctl` does.
2016-08-12 01:54:23 +03:00
Michael Klishin 0449004a6b Merge branch 'master' into rabbitmq-cli-change-cluster-node-type 2016-08-12 01:04:01 +03:00
Michael Klishin 81ea222428 Fix CLI arguments parsing for policies, brush up tests
Policy commands now work on the CLI against an actual node.
2016-08-11 17:15:43 +03:00
Michael Klishin e9ef2cff34 Merge branch 'master' into rabbitmq-cli-policies-commands 2016-08-11 13:58:11 +03:00
Michael Klishin ad2b4627c7 Merge branch 'master' into rabbitmq-cli-9
Conflicts:
	lib/rabbitmq/cli/ctl/parser.ex
	lib/rabbitmqctl.ex
2016-08-11 11:52:54 +03:00
Michael Klishin ef2c06f0f4 Merge branch 'master' into rabbitmq-cli-force-boot-command 2016-08-11 11:12:59 +03:00
Michael Klishin 29c3bf3f43 Wording, cosmetics 2016-08-11 10:56:32 +03:00
Michael Klishin cb03611e2a Merge branch 'master' into rabbitmq-cli-78 2016-08-11 10:49:39 +03:00
Michael Klishin 7525ee3373 Cosmetics 2016-08-11 09:52:37 +03:00
Michael Klishin 76fb17d8f2 Use MapSet.difference/2 here, too 2016-08-11 09:37:48 +03:00
Michael Klishin 30e0c66127 Use sets in more places; rabbit_plugins:ensure/1 expects an Erlang list
Both CLI and tests now generally work as expected.
2016-08-11 01:44:27 +03:00
Michael Klishin 05db449187 Handle duplicates on plugin lists, be more defensive with defaults
Makes CLI invocations of `rabbitmq-plugins {enable, disable, list}`
mostly work.
2016-08-11 01:27:13 +03:00
Daniil Fedotov 6f3f0854bd Rename auto complete option for consistency 2016-08-10 18:19:06 +01:00
Michael Klishin 31c3356c56 Use effective program name in help command output
Note that this solution is imperfect because
for tests the name of the tool is `mix`. But most
tests don't care.
2016-08-09 15:05:48 +03:00
Michael Klishin bec4e6f4f9 Drop rabbitmq-plugins active_plugins
`rabbitmq-plugins list` with flags can do the same thing.

Per discussion with @hairyhum.
2016-08-09 13:46:20 +03:00
Michael Klishin eef1c36024 Drop _plugins from plugin management module names 2016-08-09 00:03:58 +03:00
Michael Klishin a06a4321d6 merge_defaults_defaults => merge_all_defaults 2016-08-08 21:46:47 +03:00
Daniil Fedotov ca98b02656 Implement policy management commands 2016-07-29 14:59:19 +01:00
Daniil Fedotov 4d40649d44 Command auto completion 2016-07-28 17:46:37 +01:00
Daniil Fedotov a0c5af375b Implement forget_cluster_node command 2016-07-27 14:41:02 +01:00
Daniil Fedotov e89bf53357 Do not require rabbit as dependency 2016-07-27 12:27:27 +01:00
Daniil Fedotov 7b35c7c2cc More validation, error handling and tests 2016-07-27 11:48:24 +01:00
Daniil Fedotov f2c4986fcf Implementing rename_cluster_nodes command 2016-07-26 18:08:37 +01:00
Daniil Fedotov cd68b3ce9c Implement change_cluster_node_type command 2016-07-25 16:48:45 +01:00
Daniil Fedotov 12cbd50f10 Implement update_cluster_nodes command 2016-07-25 15:11:05 +01:00
Daniil Fedotov 0eee8e2446 Implement force_boot command 2016-07-25 14:01:41 +01:00
Daniil Fedotov 57c4a0fa69 Fix some tests 2016-07-25 14:00:55 +01:00
Daniil Fedotov a84cd93d2e Implement eval command 2016-07-22 17:17:15 +01:00
Michael Klishin 58708b6ac3 Merge branch 'master' into rabbitmq-cli-83 2016-07-15 23:54:48 +03:00
Michael Klishin 909a3b41fe Adapt to recent server rabbit_health_check changes 2016-07-15 23:47:15 +03:00
Michael Klishin 786ec7672d Rename 2016-07-10 21:36:12 +03:00
Michael Klishin 09fc873a34 Improve a couple of error atoms 2016-07-10 19:47:27 +03:00
Michael Klishin 70f486c27d Squash a few compilation warnings 2016-07-10 12:08:33 +03:00
Michael Klishin 941263e83c Eliminate several warnings 2016-06-26 22:47:37 +03:00
Daniil Fedotov 5b828c7e64 Tests for command modules 2016-06-23 12:33:39 +01:00
Daniil Fedotov 5c5f4d4414 Plugins command tests 2016-06-23 10:50:01 +01:00
Daniil Fedotov eda1e7cac2 Tests for list plugins command 2016-06-23 10:50:01 +01:00
Daniil Fedotov 963f6a2ff9 tests for list plugins command 2016-06-23 10:50:01 +01:00
Daniil Fedotov 2415ee58aa Plugin management commands 2016-06-23 10:50:01 +01:00
Daniil Fedotov 75d8632d87 Aliases in behaviour. List plugins command 2016-06-23 10:50:01 +01:00
Daniil Fedotov 33caaecb9b Select command scope by namespace 2016-06-23 10:50:01 +01:00
Daniil Fedotov 0d026a5f4a Example plugins command 2016-06-23 10:50:01 +01:00
Daniil Fedotov deb6e99b49 Removed scopes from command behaviour 2016-06-23 10:50:01 +01:00
Daniil Fedotov 9baa5c1ebe Load commands from load path. Specify scope in application config by file name 2016-06-23 10:50:01 +01:00
Daniil Fedotov 1f3bc3e6d7 Use scopes and separate Mix projects to generate escripts 2016-06-23 10:50:01 +01:00
Michael Klishin 78ae2585a3 Inline 2016-06-15 00:22:42 +03:00
Michael Klishin bc5ff3bf26 Merge pull request #79 from rabbitmq/rabbitmq-cli-69
Purge queue command
2016-06-14 23:07:55 +03:00
Michael Klishin 2d68d42241 Assert that messages were purged; don't assume 0 messages were deleted 2016-06-14 23:04:27 +03:00
Michael Klishin d77eb83c5f A few Helpers.parse_node calls are no longer necessary
[Finish ##121221959]
2016-06-14 14:21:16 +03:00
Andrew Bruce ec3a191515 Purge queue command
This initial version makes two RPC calls:

1. Gets the amqqueue resource
2. Makes the purge request using that resource

Issue #69
2016-06-14 10:31:47 +01:00
Michael Klishin 39b3de4d1e Namespace commands, fixes #74
Note that the top level module is not namespaced. It's
not clear to me if it should be or will be end up using
and (Elixir/Mix) umbrella project anyway.
2016-06-10 02:54:22 +03:00
Michael Klishin 506c9cc43f Normalize node names before passing them to Command.run/2
Fixes #76.
2016-06-10 00:56:44 +03:00
Andrew Bruce 0c94b3d87a Fix typo in node name 2016-06-09 15:49:57 +01:00
Michael Klishin c7af6e7398 Normalize node name 2016-06-09 15:30:01 +03:00
Michael Klishin e95a085b3e Merge branch 'master' into rabbitmq-cli-70 2016-06-09 15:19:46 +03:00
Michael Klishin fe2eb2d31b Normalize node names in sync_queue and cancel_sync_queue 2016-06-09 15:19:29 +03:00
Andrew Bruce 7730539bc1 set_cluster_name
- Shows up in help
- Validates args a bit
- Has no defaults

Issue #70

[#116551629]
2016-06-09 11:29:27 +01:00
Michael Klishin d59e0fa444 Merge branch 'master' into rabbitmq-cli-67 2016-06-09 04:13:48 +03:00
Michael Klishin d27469c665 RabbitMQ.CLI.RabbitMQCtl => RabbitMQ.CLI.Ctl, references #74 2016-06-09 04:08:21 +03:00
Michael Klishin 4e31f4c627 More renaming, references #74 2016-06-09 04:00:43 +03:00
Michael Klishin 509179402a Missing file for the previous commit 2016-06-09 03:35:11 +03:00
Michael Klishin 8fcad8338e Namespace more modules under RabbitMQ.CLI, part of #74 2016-06-09 03:34:56 +03:00
Michael Klishin 89a3cd954c Merge branch 'master' into rabbitmq-cli-67 2016-06-09 02:23:53 +03:00
Michael Klishin 0c35f5a8cd Move start_distribution into RabbitMQ.CLI.Distribution 2016-06-09 02:23:10 +03:00
Michael Klishin 3a2b277d4f Squash a warning 2016-06-09 00:42:51 +03:00
Daniil Fedotov 091105e5b0 0 arity start_distribution 2016-06-08 17:04:08 +01:00
Daniil Fedotov 9b703b2896 Dynamically select distribution node 2016-06-08 15:19:37 +01:00
Michael Klishin d834e8007b Merge branch 'master' into rabbitmq-cli-67 2016-06-08 16:53:02 +03:00
Michael Klishin 2de1460e65 Missing license header 2016-06-08 03:34:49 +03:00
Michael Klishin 34961e7fed Implement sync_queue and cancel_sync_queue commands
Happy path tests need a multi-node testing framework.
2016-06-08 03:32:41 +03:00
Michael Klishin 9d2af8c352 Introduce RabbitCommon.Records
While I ended up not using this, this allows for easier manipulation
of amqqueue records from IEx:

``` elixir
require RabbitCommon.Records
Keyword.get(RabbitCommon.Records.amqqueue(amq_queue_record), :pid)
```

It also demonstrates how records can be organized in this (supposedly) multi-tool
repository.
2016-06-08 03:08:06 +03:00
Michael Klishin 204e982a94 Make usage/0 return a string 2016-06-08 01:48:49 +03:00
Michael Klishin e41cba0cb5 Clarify what 'target node' is 2016-06-07 01:19:21 +03:00
Jean-Sébastien Pédron 1b1534f86b Implement the `join_cluster` command
Compared to the Erlang-based rabbitmqctl's command, this one accepts
`--disc` to specify the node type. In the implementation, it does
nothing because that's the default value already. It is only to improve
consistency, because there is a `--ram` flag.

The testsuite for this command is incomplete in this commit. When a
testcase will be able to start and stop multiple nodes, the testsuite
will need to be completed.

[#116551629]
2016-06-06 16:06:52 +02:00
Jean-Sébastien Pédron 9349c9bf07 Improve "Please stop the node with rabbitmqctl stop_app" message
... with "Please stop RabbitMQ with rabbitmqctl stop_app".

The previous message didn't make sense: `stop_app` only stop the
RabbitMQ application, not the entire node (which we don't want to do in
the context of this message).
2016-06-06 16:00:50 +02:00
kjnilsson e5c35c2939 merge 2016-06-02 16:09:56 +01:00
kjnilsson 43ae69a06d Implement wait command 2016-06-02 16:03:54 +01:00
Michael Klishin 8c6d1a80ce Merge branch 'master' into rabbitmq-cli-61 2016-06-02 17:03:03 +03:00
Michael Klishin 771e0193fe Squash a warning 2016-06-02 17:01:59 +03:00
kjnilsson 17fff860c8 Implement rotate_logs command 2016-06-02 13:01:12 +01:00
kjnilsson 65efddef2f Implement stop command 2016-06-02 12:48:41 +01:00
Michael Klishin ebb0dd579b Cosmetics 2016-06-02 14:16:15 +03:00
kjnilsson dec08906fa Implement reset and force_reset commands 2016-06-02 11:55:10 +01:00
Michael Klishin be84eb1e96 Handle node healthcheck failures 2016-06-02 01:38:09 +03:00
Michael Klishin d6d68af950 Merge branch 'master' into rabbitmq-cli-51 2016-06-01 23:42:56 +03:00
Michael Klishin 04395c44b2 Merge branch 'master' into rabbitmq-cli-55 2016-06-01 22:47:04 +03:00
kjnilsson 884ef6a11b Implement start_app and stop_app commands 2016-06-01 20:12:35 +01:00
Michael Klishin 0e028c3526 Merge branch 'master' into rabbitmq-cli-52 2016-06-01 18:18:07 +03:00
kjnilsson 5bd17fe241 Implement the close_connection command 2016-06-01 16:05:55 +01:00
Michael Klishin 27d4d89acb Brush up change_password tests 2016-06-01 17:04:32 +03:00
Michael Klishin fc5c7f287e Brush up authenticate_user tests, fix AuthenticateUserCommand#banner 2016-06-01 17:01:30 +03:00
Michael Klishin cd63268b9a Fix banner of the add_user command 2016-06-01 16:52:22 +03:00
Michael Klishin f69f601386 Implement the node_health_check command 2016-06-01 16:44:12 +03:00
kjnilsson 60bbca6ead fix list_bindings banner function clause error 2016-06-01 08:40:57 +01:00
kjnilsson 715f691b8e avoid connecting to rabbitmq before executing help command
avoid printing a nil banner
2016-05-31 09:40:48 +01:00
Michael Klishin 1261a2c20f This fn should to be public now 2016-05-30 02:17:13 +03:00
Michael Klishin c8f36766b2 Don't fail with undef when printing command usage info with invalid CLI arguments 2016-05-30 02:16:10 +03:00
Michael Klishin 17f6c10f6b Cosmetics 2016-05-30 02:06:52 +03:00
Daniil Fedotov 70c17aa4f0 Print full usage on errors 2016-05-27 08:59:14 -06:00
Daniil Fedotov e01e0da063 Print help for selected command 2016-05-27 08:59:14 -06:00
kjnilsson d8ed6bef3c merge 2016-05-27 12:10:11 +01:00
kjnilsson 0704c14376 update status command with new behaviour 2016-05-27 11:25:21 +01:00
Michael Klishin aab8281fef Cosmetics 2016-05-27 11:46:52 +03:00
Daniil Fedotov a01c6436a0 Basic check for options overlap 2016-05-26 16:50:06 -06:00
Daniil Fedotov d83a59637d Ability to specify switches in commands 2016-05-26 15:02:10 -06:00
Michael Klishin a879c2a185 Cosmetics 2016-05-26 01:52:21 +03:00
Michael Klishin ace351daa3 Cosmetics 2016-05-26 01:51:45 +03:00
Michael Klishin fb060e0cc5 Wording 2016-05-26 01:51:31 +03:00
Michael Klishin 092647b63a Clean up 2016-05-26 01:50:49 +03:00
Daniil Fedotov d2a1367168 Cleanup 2016-05-25 23:13:37 +01:00
Daniil Fedotov bf7872cbb4 unused erg 2016-05-25 22:40:39 +01:00
Daniil Fedotov ed79aae726 Listing items in parallel 2016-05-25 22:34:15 +01:00
Daniil Fedotov cfe41481a3 Return Stream from listing commands 2016-05-25 20:03:17 +01:00
kjnilsson cea02c562c Initial implementations of cluster_status and report command 2016-05-24 10:00:40 +01:00
Michael Klishin 6264d69eb8 Merge branch 'stable' into rabbitmq-cli-31 2016-05-23 16:29:11 +03:00
Michael Klishin 8774cc7cc3 Cosmetics 2016-05-23 16:23:44 +03:00
Michael Klishin 3fc388ac90 Merge pull request #34 from rabbitmq/rabbitmq-cli-33
add mem_relative usage option to set_disk_free_limit
2016-05-23 14:07:19 +03:00
kjnilsson ec5fec1561 add mem_relative usage option to set_disk_free_limit 2016-05-23 10:53:55 +01:00
Daniil Fedotov a0cba28cdd Rename param to vhost 2016-05-23 10:23:07 +01:00
Daniil Fedotov aad7e41af2 Parameter list and clear commands 2016-05-23 10:23:07 +01:00
Daniil Fedotov ec5b8b3317 Rename param to vhost in broker display commands 2016-05-21 18:57:39 +01:00
Michael Klishin 8725945520 Cosmetics 2016-05-21 17:42:03 +03:00
Michael Klishin c5915b75f6 Squash a warning 2016-05-21 17:33:59 +03:00
Michael Klishin f4e9d04751 Merge branch 'stable' into rabbitmq-cli-29 2016-05-21 17:33:51 +03:00
Daniil Fedotov 52a5488025 Made all timeout errors return timeout in seconds 2016-05-20 18:16:35 +01:00
Michael Klishin ac19b90e66 Squash a couple of warnings 2016-05-20 17:46:36 +03:00
Daniil Fedotov ca8762b729 Renamed "param" to "vhost" 2016-05-19 17:28:27 +01:00
Daniil Fedotov 46b5279a14 Mention consumerinfoitems in usage 2016-05-19 14:26:40 +01:00
Daniil Fedotov 52a9aa2c96 More broker display tests 2016-05-19 14:26:40 +01:00
Daniil Fedotov 670e7bbe47 RpcStream tests 2016-05-19 14:26:40 +01:00
Daniil Fedotov b1b90b7131 wip. testing queues command 2016-05-19 14:26:40 +01:00
Daniil Fedotov 1abf9622f2 list_* commands 2016-05-19 14:26:40 +01:00
Daniil Fedotov ee12c4d526 Linee break in command specific usage 2016-05-10 09:58:54 +01:00
Daniil Fedotov b7b2bbdcd2 Merge pull request #26 from rabbitmq/rabbitmq-cli-25
Re-parse the command on bad option in standard messages
2016-05-10 09:29:50 +01:00
Brandon Shroyer 3fa54b1666 Merge pull request #20 from rabbitmq/experimental
Refactorings
2016-05-09 18:52:58 -04:00
Brandon Shroyer fe6f9763fd Parse commands internally in some print_standard_message commands 2016-05-09 11:38:37 -04:00
Brandon Shroyer 675b53040a Re-parse the command on bad option in standard messages 2016-05-09 11:07:49 -04:00
Brandon Shroyer 76a228feec Fix clear_permissions default option merge so it doesn't suppress quiet flag 2016-05-09 10:21:39 -04:00
Daniil Fedotov a4033ef769 Print usage on incorrect command behaviour 2016-05-09 11:07:46 +01:00
Daniil Fedotov 3f869e18fb Fixing tests 2016-05-05 18:17:50 +01:00
Daniil Fedotov ed28bef62e Some refactorings 2016-05-05 11:39:27 +01:00
Daniil Fedotov 357904e0fe Experimental 2016-05-05 11:22:42 +01:00
Brandon Shroyer 1269397f03 Add run to command behaviour 2016-05-04 19:21:21 -04:00
Brandon Shroyer a158a1b2a8 Refactor module command execution in main module 2016-05-04 19:21:21 -04:00
Brandon Shroyer a2bedded17 WIP: Change module-specific command name to to run/2 2016-05-04 19:21:21 -04:00
Brandon Shroyer 72c15cd8f2 Squash unused variable warning in list_users 2016-05-04 17:11:43 -04:00
Brandon Shroyer 90019eaf41 Add CommandBehaviour behavior to all command modules 2016-05-04 17:10:47 -04:00
Brandon Shroyer 819aa082b7 Create command behaviour 2016-05-04 17:07:54 -04:00
Brandon Shroyer 40552dab87 Merge unaliased options into parser output (so they can trigger a validation failure later) 2016-05-04 16:21:18 -04:00
Brandon Shroyer ca07bee46f Add check for valid flags to main module 2016-05-04 15:40:09 -04:00
Brandon Shroyer 3cdfdb31c4 Add short flags/0 function to all modules 2016-05-04 15:37:35 -04:00
Brandon Shroyer f533448239 Add suppressable info message to authenticate_user command 2016-05-03 13:37:34 -04:00
Brandon Shroyer 3bd83784d2 Add suppressable info message to change_password_command 2016-05-03 13:32:08 -04:00
Brandon Shroyer fa97614b01 Add suppressable info message to clear_password command 2016-05-03 12:24:00 -04:00
Brandon Shroyer e699284682 Add suppressable info message to clear_permissions command 2016-05-03 12:19:03 -04:00
Brandon Shroyer 98958bc4f3 Add suppressable info message to add_user command 2016-05-03 11:56:03 -04:00
Brandon Shroyer 6b86324f62 Add suppressable info message to delete_user command 2016-05-03 11:50:06 -04:00
Brandon Shroyer ad56b57d0d Add suppressable info message to add_vhost command 2016-05-03 11:08:12 -04:00
Brandon Shroyer ab52576aea Add suppressable info message to delete_vhost command 2016-05-03 11:00:41 -04:00
Brandon Shroyer 266bd15779 Add suppressable info messages to list_permissions command 2016-05-03 10:51:28 -04:00
Brandon Shroyer b6010b4af5 Add suppressable info message to list_user_permissions 2016-05-03 10:28:40 -04:00
Brandon Shroyer 7836306f55 Add suppressable info message to list_users command 2016-05-03 10:26:00 -04:00
Brandon Shroyer 49d961c2b3 Add suppressable info message to list_vhosts command 2016-05-03 09:54:54 -04:00
Brandon Shroyer 503dda6ef2 Add suppressable info message to environment command 2016-05-02 18:01:30 -04:00
Brandon Shroyer 7bc042ff89 Add suppressable info to set_parameter command 2016-05-02 17:53:18 -04:00
Brandon Shroyer b516dd273c Add suppressable info to set_permissions command 2016-05-02 17:37:27 -04:00
Brandon Shroyer a49757374c Add suppressable info message to set_user_tags command 2016-05-02 17:25:39 -04:00
Brandon Shroyer 52e4a7a864 Add suppressable info message to set_disk_free_limit command 2016-05-02 16:42:23 -04:00
Brandon Shroyer dae755665a Add suppressed info string to set_vm_memory_high_watermark 2016-05-02 16:29:50 -04:00
Brandon Shroyer 4abc6b63bd Add suppressed info message to trace_on command 2016-05-02 11:23:34 -04:00
Brandon Shroyer 170ea6662e Add quiet-suppressed info message to trace_on, fix testing bugs 2016-05-02 11:07:15 -04:00
Brandon Shroyer 31b377f4ce Status command prints info string unless suppressed 2016-05-02 10:38:54 -04:00
Peter Geiger 56d9de33b1 Allow CLI to use short node names 2016-04-29 17:59:11 -04:00
Brandon Shroyer a0327450e8 Return all invalid keys in list_vhost 2016-04-29 14:51:42 -04:00
Brandon Shroyer 7b0b2ac97c Remove argument count restriction from list_vhosts 2016-04-29 14:29:50 -04:00
Brandon Shroyer 555aad1c40 Alter usage formatting to handle commands with multiple usage strings 2016-04-29 14:08:42 -04:00
Brandon Shroyer a896ccd3e8 Switch add_user to arg count based usage reporting 2016-04-26 16:47:16 -04:00
Brandon Shroyer d595185ce4 Switch add_vhost over to arg count based usage reporting 2016-04-26 16:38:01 -04:00
Brandon Shroyer fc1ee4266e Switch authenticate_user over to arg count usage reporting 2016-04-26 16:35:05 -04:00
Brandon Shroyer 646466eb19 Switch change_password over to arg count error reporting 2016-04-26 16:34:45 -04:00
Brandon Shroyer cd8149696f Switch clear password command over to arg count usage reporting 2016-04-26 16:24:33 -04:00
Brandon Shroyer 371bfde774 Switch clear_permissions command over to arg count usage reporting 2016-04-26 16:21:03 -04:00
Brandon Shroyer 91f94e583c Switch delete_user to arg-count based usage reporting 2016-04-26 16:16:07 -04:00
Brandon Shroyer 4a2ea01d0f Switch delete_vhost to arg-count based usage error reporting 2016-04-26 16:15:44 -04:00
Brandon Shroyer d54e39ee56 Switched environment command to arg count based usage error system 2016-04-26 16:09:06 -04:00
Brandon Shroyer 9beddc776d Switch list_permissions to a arg count-based usage error 2016-04-26 16:08:45 -04:00
Brandon Shroyer 744506bf52 Switch list_users to arg count-based usage error 2016-04-26 16:04:00 -04:00
Brandon Shroyer 8e83fd5ba2 Switch list_vhosts to arg count-based usage errors 2016-04-26 16:01:32 -04:00
Brandon Shroyer 3de60107e9 Remove generic usage from and add arg counts to set_disk_free_limit 2016-04-26 15:57:40 -04:00
Brandon Shroyer 8f7881e892 Remove generic usage from set_parameter and use arg count error 2016-04-26 15:50:29 -04:00
Brandon Shroyer f868d64eef Remove general usage from set permissions command and use arg count errors 2016-04-26 15:44:36 -04:00
Brandon Shroyer 784c0aacdb Remove full usage message and use argument count errors in set_user_tags 2016-04-26 15:06:46 -04:00
Brandon Shroyer bba6bf814a Remove full usage message from high watermark command and switch it over to arg count errors 2016-04-26 14:59:46 -04:00
Brandon Shroyer da92464315 Remove full usage message from list_user_permissions 2016-04-26 14:46:26 -04:00
Brandon Shroyer a770f2b0da Remove full usage message from trace_on command 2016-04-26 14:43:43 -04:00
Brandon Shroyer b15e7dbae5 Remove full usage message from trace_off command 2016-04-26 14:43:27 -04:00
Brandon Shroyer e9647d18db Removed full usage from status module 2016-04-26 14:40:26 -04:00
Brandon Shroyer 693236ee70 Add argument count error reporting to main module. 2016-04-26 14:38:23 -04:00
Brandon Shroyer f71a766df5 Use too_many_args error in trace_off command 2016-04-26 13:46:04 -04:00
Brandon Shroyer 45f44a6b68 Use too_many_args error in trace_on command 2016-04-26 13:45:55 -04:00
Brandon Shroyer a1eac46e90 Separate argument count error codes from bad argument error codes in rabbitmqctl main 2016-04-26 12:20:11 -04:00
Brandon Shroyer 92f35a840a Use too many and not enough args return codes in list_user_permissions 2016-04-26 12:19:12 -04:00
Brandon Shroyer 4fa9912218 Use too many args return in status command 2016-04-26 12:12:32 -04:00
Brandon Shroyer a531a425bc Add too_many_args and not_enough_args to standard codes 2016-04-26 12:10:10 -04:00
Brandon Shroyer cf9ec432b9 Merge pull request #15 from potatosalad/feature-set_parameter
Implement the set_parameter command.
2016-04-05 14:09:44 -04:00
Brandon Shroyer a4a035d062 Convert unrecognized return codes to a standardized system 2016-04-05 13:58:31 -04:00
Andrew Bennett 87ae32d011 Implement the set_parameter command. 2016-04-04 09:41:54 -06:00
Brandon Shroyer 8daf2c182a Improve handling of refused authentication 2016-04-01 13:58:47 -04:00
Brandon Shroyer b2be1e8307 Handle extra edge case of authenticate_user return tuple 2016-04-01 13:42:25 -04:00
Brandon Shroyer 675dbbe321 Use standardized error code for bad info keys in list_vhosts 2016-04-01 13:25:52 -04:00
Brandon Shroyer 51922e4215 Fix exit code implementation so that it actually returns exit codes 2016-04-01 12:13:01 -04:00
Brandon Shroyer c7dac61b21 Correct missing argument handling for absolute memory watermark command 2016-04-01 11:50:41 -04:00
Brandon Shroyer 98cf6a4537 Return bad argument for relative vm memory high watermark values > 1.0 2016-04-01 11:33:05 -04:00
Brandon Shroyer 828deac972 Disallow units when setting relative VM memory high watermark 2016-04-01 11:33:05 -04:00
Brandon Shroyer 8b018f4d51 Idiomatic changes to set_vm_memory_high_watermark 2016-04-01 11:33:05 -04:00
Michael Klishin 32b09446bf Squash a warning 2016-04-01 18:15:29 +03:00
Brandon Shroyer 38126fb807 Implement unit parsing and memory-relative versions of set_disk_free_limit 2016-04-01 11:04:12 -04:00
Brandon Shroyer 54d26a19cb Add byte conversions to set_disk_free_limit 2016-03-30 15:17:46 -04:00
Brandon Shroyer 10b7565cc6 Implement absolute version of set_disk_free_limit 2016-03-29 19:03:42 -04:00
Brandon Shroyer 216f5478a7 Change multi-line usage output to array 2016-03-29 15:25:51 -04:00
Brandon Shroyer 4446a46c7a Flatten command usage output array 2016-03-29 15:25:26 -04:00
Brandon Shroyer e254c3fd07 Reenabling printout in rabbitmqctl for debugging purposes. 2016-03-29 15:23:09 -04:00
Brandon Shroyer 599afa3cc6 Merge pull request #11 from rossjones/vm-memory-high-watermark
Implement the set_vm_high_watermark command.
2016-03-28 21:35:03 +01:00
Ross Jones e3b579d793 Fix overly complex signature for absolute values.
Removes the list param for setting absolute values and just passes the
important information.
2016-03-28 20:00:57 +01:00
Brandon Shroyer 6e7c054446 Alias param flag in parser 2016-03-28 11:18:08 -04:00
Brandon Shroyer ed1e7784bf Refactor default autofills in main module 2016-03-28 11:18:08 -04:00
Ross Jones 540f67d70f Allows watermark to be specified as an absolute value
Rabbit allows the watermark to be specified as an absolute value, or an
absolute value with memory units .. such as {:absolute, N} which can be
specified as 'absolute 10' or 'absolute 10MB'.  In the case of the
latter, the value in bytes is sent as N.

This commit adds some useful functions for calculating the absolute
values to the Helpers module.
2016-03-26 15:57:47 +00:00
Ross Jones 7df223f617 Implements the clear-permissions-command
Allows for the removal of all permissions for a given username.
2016-03-26 09:38:33 +00:00
Ross Jones 0791e5d08b Implement the set_vm_high_watermark command.
The set_vm_high_watermark command allows you to set the ratio of memory
usage at which point rabbit will start throttling and alerting.
2016-03-26 09:23:17 +00:00
Brandon Shroyer 5de1fc05fd Implement set_permissions command 2016-03-23 18:13:35 +00:00
Brandon Shroyer b3f66cb498 Implement list_permissions_command 2016-03-23 16:55:00 +00:00
Brandon Shroyer c7d08beb9c Implement clear_password command 2016-03-23 12:16:00 +00:00
Brandon Shroyer 6a1591bf9d Implemented change_password command 2016-03-22 18:06:46 +00:00
Brandon Shroyer 8088945c1d Implement authenticate_user command 2016-03-22 17:37:25 +00:00
Brandon Shroyer 0dce65834e Implement set_user_tags command 2016-03-22 16:41:59 +00:00
Brandon Shroyer bebc03b4a5 Converting some tabs that snuck in into spaces 2016-03-22 16:21:12 +00:00
Brandon Shroyer f387fd97d0 Remove extra print statement from result handler 2016-03-22 14:57:35 +00:00
Brandon Shroyer 6bde6372f9 Remove unnecessary (and noisy) exit calls 2016-03-22 13:38:55 +00:00
Brandon Shroyer 5e9a19a9d9 Add bad_argument return to delete_vhost command 2016-03-22 12:33:49 +00:00
Brandon Shroyer e2cff15839 Add bad_argument return to delete_user command 2016-03-22 12:33:22 +00:00
Brandon Shroyer e296371f42 Add bad_argument return for add_vhost command 2016-03-22 12:32:42 +00:00
Brandon Shroyer a95942f345 Add bad_argument for add_user command 2016-03-22 12:32:19 +00:00
Brandon Shroyer 22b8f36bce Add bad_argument to environment command 2016-03-22 10:41:51 +00:00
Brandon Shroyer 068e0e97ed Add bad_argument return to list_user_permissions. 2016-03-21 18:29:50 +00:00
Brandon Shroyer 7ca8f8579f Added bad_argument return to list_users command. 2016-03-21 18:29:20 +00:00
Brandon Shroyer aeaeb69894 Add bad_argument return to list_vhosts. 2016-03-21 18:18:55 +00:00
Brandon Shroyer 79b667a766 Add bad_argument return to trace_on on bad arguments. 2016-03-21 18:11:26 +00:00
Brandon Shroyer 434a6704d2 Add bad_argument return to trace_off on bad arguments. 2016-03-21 18:10:57 +00:00
Brandon Shroyer a17b03283f Implement Unix-style exit codes from server-396
* Implements a set of Unix-like exit codes described in https://github.com/rabbitmq/rabbitmq-server/issues/396
2016-03-21 17:59:22 +00:00
Brandon Shroyer a6a9396ada Fix copy-pasta error in timeout test. 2016-03-21 12:08:49 +00:00
Brandon Shroyer 5e1e56b873 Remove extraneous untracked variable from status command 2016-03-18 16:38:58 +00:00
Brandon Shroyer 925c782cc5 Implement list_users command 2016-03-17 15:17:27 +00:00
Brandon Shroyer 783c2cf9e0 Implement delete_user command 2016-03-16 15:29:56 +00:00
Brandon Shroyer 824c5430ef Implement add_user command. 2016-03-16 14:19:44 +00:00
Brandon Shroyer 2f9d4ab07b Add support for list_vhosts (Erlangish output only) 2016-03-10 13:30:30 -05:00
Brandon Shroyer 82072fd3c9 Add support for trace_on, trace_off. 2016-03-09 11:42:03 -05:00
Brandon Shroyer a065934ff7 Remove unnecessary variable bindings. 2016-03-09 11:41:34 -05:00
Brandon Shroyer 2e0cd895b4 Add delete_vhost command. 2016-03-08 15:54:49 -05:00
Brandon Shroyer 060bc3c1df Add some extra edge-case tests to add_vhost 2016-03-08 15:53:40 -05:00
Brandon Shroyer 5dc8d32dc7 Add add_vhost command. 2016-03-08 14:57:56 -05:00
Brandon Shroyer 95286b2ee2 Remove unhelpful autofills from RabbitMQCtl errors. 2016-03-08 12:16:38 -05:00
Brandon Shroyer 86b09639ec Add timeouts to list_user_permissions, refactor a bunch of tests. 2016-03-08 12:05:25 -05:00
Brandon Shroyer f697e93d02 Converted options to maps. 2016-03-07 17:48:03 -05:00
Brandon Shroyer 6a4381c12c Auto-populate empty option[:node] in rabbitmqctl.main 2016-03-07 14:14:35 -05:00
Brandon Shroyer 28463f4d7f Add list_user_permissions, support for commands with args. 2016-03-07 11:16:19 -05:00
Brandon Shroyer cd614ca8da Refactor commands to use rpc_call from :rabbit_misc library. 2016-03-07 10:32:34 -05:00
Brandon Shroyer ff8485baae Fill out help command. 2016-03-04 17:36:49 -05:00
Brandon Shroyer d681309dce Add rudimentary usage support, refactoring main command. 2016-03-04 16:48:25 -05:00
Brandon Shroyer de9463b859 Add support for multi-underscore command modules. 2016-03-04 13:16:18 -05:00
Brandon Shroyer a5a54f1f85 Generate map of command modules. 2016-03-04 13:15:53 -05:00
Brandon Shroyer 9eb6345d10 Replace Mix.Utils.camelize with user-defined function. 2016-03-03 11:06:30 -05:00
Brandon Shroyer 4ef6f2e4ba Use strict switch handling in OptionParser. 2016-03-01 18:04:16 -05:00
Brandon Shroyer f135594e91 Filling out new command instructions in README.md. 2016-03-01 17:48:32 -05:00
Brandon Shroyer 21f151c2c0 Add support for environment command. 2016-03-01 16:25:01 -05:00
Brandon Shroyer 5a6e7ae8bc Use code module to avoid naming commands explicitly in RabbitMQCtl.main. 2016-02-25 16:16:25 -05:00
Brandon Shroyer c46a5156cb Split status printing methods into separate module. 2016-02-25 15:03:28 -05:00
Brandon Shroyer 23944df43c Dry out pattern-matching in print functions. 2016-02-25 11:45:35 -05:00
Brandon Shroyer e12762104b Add remaining properties to status printout. 2016-02-25 11:34:42 -05:00
Brandon Shroyer 43e12e7b92 Refactored table printing into separate module. 2016-02-24 18:28:12 -05:00
Brandon Shroyer 695b3bf527 Refactor line breaks. 2016-02-24 13:16:25 -05:00
Brandon Shroyer 87a604b47d Add memory info printing to status. 2016-02-24 13:11:23 -05:00
Brandon Shroyer d6f51eb766 Added Erlang OTP, ERTS version to status and refactored running apps display. 2016-02-24 12:24:39 -05:00
Brandon Shroyer 8764f59093 A couple of comments and some nicer spacing between public and private methods. 2016-02-03 10:15:43 -05:00
Brandon Shroyer d5278f0ec3 Added legal boilerplate. 2016-02-03 10:01:32 -05:00
Brandon Shroyer caef6f5f40 Renamed app to RabbitMQCtl. 2016-02-03 09:43:21 -05:00
Brandon Shroyer 30004992e5 Add more parser tests, alias for quiet flag. 2016-02-02 17:11:54 -05:00
Brandon Shroyer a18e230afa Rename CLI to ElixirMQCtl. 2016-02-02 17:11:09 -05:00
Brandon Shroyer a2be29a556 Add stub for usage message. 2016-02-02 16:32:35 -05:00
Brandon Shroyer a843b837d8 Style-guide compliance. 2016-02-02 16:26:10 -05:00
Brandon Shroyer 993df7ad51 Initial commit. 2016-02-02 13:54:36 -05:00