Merge "Add formatters for 'tags' in method _do_stack_show"
This commit is contained in:
@@ -419,6 +419,7 @@ def _show_stack(heat_client, stack_id, format='', short=False):
|
||||
formatters['parameters'] = complex_formatter
|
||||
formatters['outputs'] = complex_formatter
|
||||
formatters['links'] = complex_formatter
|
||||
formatters['tags'] = complex_formatter
|
||||
|
||||
return columns, utils.get_item_properties(data, columns,
|
||||
formatters=formatters)
|
||||
|
@@ -754,7 +754,8 @@ class ShellTestUserPass(ShellBase):
|
||||
"id": "1",
|
||||
"stack_name": "teststack",
|
||||
"stack_status": 'CREATE_COMPLETE',
|
||||
"creation_time": "2012-10-25T01:58:47Z"
|
||||
"creation_time": "2012-10-25T01:58:47Z",
|
||||
"tags": [u'tag1', u'tag2']
|
||||
}}
|
||||
resp = fakes.FakeHTTPResponse(
|
||||
200,
|
||||
@@ -777,9 +778,11 @@ class ShellTestUserPass(ShellBase):
|
||||
'stack_name',
|
||||
'stack_status',
|
||||
'creation_time',
|
||||
'tags',
|
||||
'teststack',
|
||||
'CREATE_COMPLETE',
|
||||
'2012-10-25T01:58:47Z'
|
||||
'2012-10-25T01:58:47Z',
|
||||
"['tag1', 'tag2']",
|
||||
]
|
||||
for r in required:
|
||||
self.assertRegexpMatches(list_text, r)
|
||||
|
@@ -1575,7 +1575,8 @@ def _do_stack_show(hc, fields):
|
||||
'stack_status_reason': utils.text_wrap_formatter,
|
||||
'parameters': utils.json_formatter,
|
||||
'outputs': utils.json_formatter,
|
||||
'links': utils.link_formatter
|
||||
'links': utils.link_formatter,
|
||||
'tags': utils.json_formatter
|
||||
}
|
||||
utils.print_dict(stack.to_dict(), formatters=formatters)
|
||||
|
||||
|
Reference in New Issue
Block a user