MXS-1300: Add module commands to MaxCtrl

Added inspection of module commands to MaxCtrl. The commands can't be
called yet.
This commit is contained in:
Markus Mäkelä
2017-07-10 11:13:37 +03:00
parent 1514ede4e1
commit e14aa729ab
3 changed files with 47 additions and 0 deletions

View File

@ -93,6 +93,13 @@ exports.builder = function(yargs) {
{'Uptime': 'attributes.uptime'}
])
})
.command('commands <module>', 'Show module commands of a module', {}, function(argv) {
getSubCollection('maxscale/modules/' + argv.module, 'attributes.commands', [
{'Command': 'id'},
{'Parameters': 'attributes.parameters[].type'},
{'Descriptions': 'attributes.parameters[].description'}
])
})
.usage('Usage: show <command>')
.help()
.command('*', 'the default command', {}, () => {