MXS-1220: Add execution of module commands to REST API

The module command self links now point to an endpoint that executes the
module command. Depending on the type of the module command, either a GET
or a POST request must be made.
This commit is contained in:
Markus Mäkelä
2017-05-31 11:09:36 +03:00
parent 08a0883ec8
commit ba546fcd21
16 changed files with 284 additions and 99 deletions

View File

@ -673,7 +673,8 @@ static MXS_ROUTER* createInstance(SERVICE* service, char** options)
* the pointer. */
/* Register a custom command */
if (!modulecmd_register_command("rrrouter", "test_command", custom_cmd_example,
if (!modulecmd_register_command("rrrouter", "test_command",
MODULECMD_TYPE_ACTIVE, custom_cmd_example,
2, custom_cmd_args))
{
MXS_ERROR("Module command registration failed.");