Displaying the MaxScale version helps identify which package the
executable was bundled with. As the MaxCtrl source is a part of MaxScale,
there's no need for separate versioning.
Being able to perform raw REST API calls that leverage the value
extraction capabilities of Node.js gives more control to the end user. It
also doubles as a handy tool for creating scripts that only require one
particular value from the REST API.
When the -p parameter is given without an argument, the password is read
from the command line. This allows passwords to be given to MaxCtrl in a
safer manner.
MaxCtrl now supports explicit paths for certificates and optional server
certificate verification. This allows testing by using a self-signed
certificate with the server certificate verification turned off.
Using commas instead of spaces prevents a the misinterpretation of
commands as hostnames. If the `--hosts` option was given just before a
command, it would consume the commands as arguments to the `--hosts` list.
The messages now show where the request failed and what was
requested. This should help resolve both develper and end-user problems.
Also fixed the missing logging of the output string in the `parse`
callback of the main function and cleaned up the POSTed server body.
The monitors should only be reused if they have the same name and they use
the same module. This way the only difference is in configuration.
Fixed MaxCtrl detection of bad options and altered monitor creation test
to expect correct results. Also improved some of the error messages.
The `cluster diff` command prints out the difference between the source
and target MaxScale. This allows users to detect changes that have
happened on one MaxScale but not on the other.
Making the core a module proved to bring more problems than it solved. For
the sake of simplicity in installation and code coverage reporting, the
core is now completely contained in the `lib/` directory.
Also added preliminary coverage reporting with nyc.