diff options
author | Steve Baker <sbaker@redhat.com> | 2016-02-17 11:17:53 +1300 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2016-05-27 10:57:37 +1200 |
commit | 3cde580165790f6e11dab90e9864fca1295d7895 (patch) | |
tree | be7681c245cd74946b472b66235cac8e10062f11 /heatclient/common/format_utils.py | |
parent | 7299dd2fdec33314a52eccef85260de79cc69801 (diff) | |
download | python-heatclient-3cde580165790f6e11dab90e9864fca1295d7895.tar.gz |
Implement "openstack stack failures list"
A command which prints failed resources in the stack to help debug
stack issues.
Failed resources are added by recursing from the top level stack into
failed nested stack resources. A failed nested stack resource is only
added to the failed list if it contains no failed resources so that the
user only sees root-cause failed resources.
As an added convenience to debugging deployment resources, deployment
outputs deploy_stdout and deploy_stderr are printed as well (the full
outputs are printed when --long is specified).
The output is a yamlish format where the key is a dot-delimited resource
name path and the value is a dict of resource information.
Change-Id: Ifa44175d8dbab2f7b62691b839e1696e3af7f4f3
Closes-Bug: #1585820
Diffstat (limited to 'heatclient/common/format_utils.py')
-rw-r--r-- | heatclient/common/format_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/heatclient/common/format_utils.py b/heatclient/common/format_utils.py index 5cb691a..2d950c9 100644 --- a/heatclient/common/format_utils.py +++ b/heatclient/common/format_utils.py @@ -81,6 +81,8 @@ def print_software_deployment_output(data, name, out=sys.stdout, long=False): The format attempts to be valid yaml, but is primarily aimed at showing useful information to the user in a helpful layout. """ + if data is None: + data = {} if name in ('deploy_stdout', 'deploy_stderr'): output = indent_and_truncate( data.get(name), |