From b9bc0f48f7354b85c47b5f9df4df18eb3794e38c Mon Sep 17 00:00:00 2001 From: Ayush Garg Date: Wed, 10 Feb 2016 22:53:35 +0530 Subject: [PATCH] Apply list_formatter on two properties Apply the 'list_formatter' from 'utils' on two properties of operation 'show-action' that are, 'depended_by' and 'depends_on'. Change-Id: Ia4a7c516778a9c9188eda610bebb061684cf5b01 Closes-Bug: #1544098 --- senlinclient/tests/unit/v1/test_shell.py | 2 ++ senlinclient/v1/shell.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/senlinclient/tests/unit/v1/test_shell.py b/senlinclient/tests/unit/v1/test_shell.py index 4471219c..cb97c288 100644 --- a/senlinclient/tests/unit/v1/test_shell.py +++ b/senlinclient/tests/unit/v1/test_shell.py @@ -1266,6 +1266,8 @@ class ShellTest(testtools.TestCase): 'outputs': utils.json_formatter, 'metadata': utils.json_formatter, 'data': utils.json_formatter, + 'depends_on': utils.list_formatter, + 'depended_by': utils.list_formatter, } sh.do_action_show(service, args) service.get_action.assert_called_once_with('action_id') diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index ce0480ba..e17adc13 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -1181,6 +1181,8 @@ def do_action_show(service, args): 'outputs': utils.json_formatter, 'metadata': utils.json_formatter, 'data': utils.json_formatter, + 'depends_on': utils.list_formatter, + 'depended_by': utils.list_formatter, } utils.print_dict(action.to_dict(), formatters=formatters)