MXS-1390: Add detailed MaxCtrl documentation

Added a more detailed description for commands that needed it.
This commit is contained in:
Markus Mäkelä
2017-09-06 10:36:32 +03:00
parent f189de47a3
commit c8490df566
16 changed files with 241 additions and 53 deletions

View File

@ -17,7 +17,14 @@ exports.desc = 'Set object state'
exports.handler = function() {}
exports.builder = function(yargs) {
yargs
.command('server <server> <state>', 'Set server state', {}, function(argv) {
.command('server <server> <state>', 'Set server state', function(yargs) {
return yargs.epilog('If <server> is monitored by a monitor, this command should ' +
'only be used to set the server into the `maintenance` state. ' +
'Any other states will be overridden by the monitor on the next ' +
'monitoring interval. To manually control server states, use the ' +
'`stop monitor <name>` command to stop the monitor before setting ' +
'the server states manually.');
}, function(argv) {
var target = 'servers/' + argv.server + '/set?state=' + argv.state
maxctrl(argv, function(host) {
return doRequest(host, target, null, {method: 'PUT'})