Commit Graph

213 Commits

Author SHA1 Message Date
Daniil Fedotov 2415ee58aa Plugin management commands 2016-06-23 10:50:01 +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
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 8fcad8338e Namespace more modules under RabbitMQ.CLI, part of #74 2016-06-09 03:34:56 +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
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 43ae69a06d Implement wait command 2016-06-02 16:03:54 +01: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
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 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 d83a59637d Ability to specify switches in commands 2016-05-26 15:02:10 -06:00
Daniil Fedotov cfe41481a3 Return Stream from listing commands 2016-05-25 20:03:17 +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 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
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 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 ca07bee46f Add check for valid flags to main module 2016-05-04 15:40:09 -04:00
Brandon Shroyer 31b377f4ce Status command prints info string unless suppressed 2016-05-02 10:38:54 -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 693236ee70 Add argument count error reporting to main module. 2016-04-26 14:38:23 -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 a4a035d062 Convert unrecognized return codes to a standardized system 2016-04-05 13:58:31 -04: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 51922e4215 Fix exit code implementation so that it actually returns exit codes 2016-04-01 12:13:01 -04:00
Brandon Shroyer e254c3fd07 Reenabling printout in rabbitmqctl for debugging purposes. 2016-03-29 15:23:09 -04:00
Brandon Shroyer ed1e7784bf Refactor default autofills in main module 2016-03-28 11:18:08 -04: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 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 a065934ff7 Remove unnecessary variable bindings. 2016-03-09 11:41:34 -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 d681309dce Add rudimentary usage support, refactoring main command. 2016-03-04 16:48:25 -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 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 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