MXS-1300: Add list listeners command

The listeners of a service can now be listed.
This commit is contained in:
Markus Mäkelä 2017-07-17 11:22:10 +03:00
parent 985fea43a0
commit 9a6e281456

View File

@ -40,6 +40,15 @@ exports.builder = function(yargs) {
])
})
})
.command('listeners <service>', 'List listeners of a service', {}, function(argv) {
maxctrl(argv, function(host) {
return getSubCollection(host, 'services/' + argv.service, 'attributes.listeners', [
{'Name': 'id'},
{'Port': 'attributes.parameters.port'},
{'Host': 'attributes.parameters.host'}
])
})
})
.command('monitors', 'List monitors', {}, function(argv) {
maxctrl(argv, function(host) {
return getCollection(host, 'monitors', [