15 Commits

Author SHA1 Message Date
Markus Mäkelä
f5110209f7
MXS-1942: Use MaxScale version in MaxCtrl
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.
2018-07-05 12:47:28 +03:00
Markus Mäkelä
6df0804e70
Add missing tls-passphrase documentation
The tls-passphrase was not documented in MaxCtrl. Also regenerated the
documentation.
2018-06-18 11:32:28 +03:00
Markus Mäkelä
8b5221e13a
Fix error message when no command is given
The error message when no commad was given referred to the unknown command
[""]. Due to the way the command was printed, it was quite confusing.
2018-05-03 10:48:32 +03:00
Markus Mäkelä
5855b307bd
Add raw REST API calls to MaxCtrl
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.
2018-04-17 09:34:11 +03:00
Markus Mäkelä
2df47d8999
Read MaxCtrl password from stdin when none provided
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.
2018-03-06 13:35:14 +02:00
Markus Mäkelä
b8df0dfc02
Print actual command on bad command
When a bad command is given, print the actual command.
2018-03-06 13:35:14 +02:00
Markus Mäkelä
5716f0b210
Add support for self-signed certificates to MaxCtrl
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.
2018-02-13 14:54:32 +02:00
Markus Mäkelä
c6f7f22117 Use comma separated lists in MaxCtrl options
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.
2018-01-10 13:00:31 +02:00
Markus Mäkelä
9a04dd0311 MXS-1300: Resolved the promise for help commands
The promise returned by the `execute` MaxCtrl library function is now
properly resolved also for `help` type commands.
2017-08-09 11:39:24 +03:00
Markus Mäkelä
db531fb2e2 MXS-1300: Improve MaxCtrl HTTP error messages
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.
2017-08-09 11:39:24 +03:00
Markus Mäkelä
e133e758a6 MXS-1300: Fix deletion of monitors
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.
2017-08-09 11:39:24 +03:00
Markus Mäkelä
3bd13cded6 MXS-1300: Fix minor MaxCtrl bugs
Fixed unresolved promises, wrong resources being requested and enabled
strict mode so unknown arguments are not ignored.
2017-08-09 11:39:24 +03:00
Markus Mäkelä
fad1b4e3e0 MXS-1300: Add simple diff calculation
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.
2017-08-09 11:39:23 +03:00
Markus Mäkelä
c9f3d014d6 MXS-1300: Improve test coverage
The tests now cover 100% of all source files with the exception of the
call.js and common.js source files.
2017-07-23 08:21:00 +03:00
Markus Mäkelä
cf8028a5ce MXS-1300: Un-modularize the core
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.
2017-07-23 08:21:00 +03:00