aboutsummaryrefslogtreecommitdiffstats
path: root/qtip/cli
diff options
context:
space:
mode:
authorTaseer <taseer94@gmail.com>2017-03-09 12:05:46 +0500
committerTaseer <taseer94@gmail.com>2017-03-18 12:17:52 +0500
commit04e50e57819bdf40a2fd7abdd3fc7be798771e0b (patch)
treec7028016531c2c4c9152352a066c6b2feeae756a /qtip/cli
parent3ce816d42d510ce60ff775f70ef689b1d1d242b2 (diff)
Refactor reporter module
- Create templates for report format specific to each metric. - Outputs the details of the specified metric across all the nodes in cluster. - Timeline to be covered in a separate patch JIRA: QTIP-199 Change-Id: Ic83749725b0c9cc5bd9a7f24f21b2cd113abe0e1 Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
Diffstat (limited to 'qtip/cli')
-rw-r--r--qtip/cli/commands/cmd_report.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/qtip/cli/commands/cmd_report.py b/qtip/cli/commands/cmd_report.py
index c780e847..cb9c70b6 100644
--- a/qtip/cli/commands/cmd_report.py
+++ b/qtip/cli/commands/cmd_report.py
@@ -10,6 +10,7 @@
import click
from qtip.cli.entry import Context
+from qtip.reporter.console import ConsoleReporter
pass_context = click.make_pass_decorator(Context, ensure=False)
@@ -22,6 +23,9 @@ def cli(ctx):
@cli.command('show')
+@click.argument('metric')
@pass_context
-def show(ctx):
- pass
+def show(ctx, metric):
+ reporter = ConsoleReporter({})
+ report = reporter.render(metric)
+ click.echo(report)