MXS-1390: Add detailed MaxCtrl documentation
Added a more detailed description for commands that needed it.
This commit is contained in:
@ -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'})
|
||||
|
Reference in New Issue
Block a user