From 9a6e281456ffcc494b33bbaad8ff5153d568be71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 17 Jul 2017 11:22:10 +0300 Subject: [PATCH] MXS-1300: Add `list listeners` command The listeners of a service can now be listed. --- maxctrl/lib/list.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maxctrl/lib/list.js b/maxctrl/lib/list.js index 9e5663dfd..00fcda87b 100644 --- a/maxctrl/lib/list.js +++ b/maxctrl/lib/list.js @@ -40,6 +40,15 @@ exports.builder = function(yargs) { ]) }) }) + .command('listeners ', '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', [