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

@ -35,10 +35,19 @@ exports.desc = 'Unlink objects'
exports.handler = function() {}
exports.builder = function(yargs) {
yargs
.command('service <name> <server...>', 'Unlink servers from a service', {}, function(argv) {
.command('service <name> <server...>', 'Unlink servers from a service', function(yargs) {
return yargs.epilog('This command unlinks servers from a service, removing them from ' +
'the list of available servers for that service. New connections to ' +
'the service will not use the unlinked servers but existing ' +
'connections can still use the servers.');
}, function(argv) {
removeServer(argv, 'services/' + argv.name, argv.server)
})
.command('monitor <name> <server...>', 'Unlink servers from a monitor', {}, function(argv) {
.command('monitor <name> <server...>', 'Unlink servers from a monitor', function(yargs) {
return yargs.epilog('This command unlinks servers from a monitor, removing them from ' +
'the list of monitored servers. The servers will be left in their ' +
'current state when they are unlinked from a monitor.');
}, function(argv) {
removeServer(argv, 'monitors/' + argv.name, argv.server)
})
.usage('Usage: unlink <command>')