diff options
author | Steven Pisarski <s.pisarski@cablelabs.com> | 2017-10-20 15:09:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-10-20 15:09:38 +0000 |
commit | 7766bd2f8ef5f7ddb9ee231179bb38023d65a972 (patch) | |
tree | 396442091c9bc9d6afe6f2d9c3d74da4d9f0e381 /snaps/openstack/utils | |
parent | d5d282dd1ffab96e85332bea580689c3297a25f8 (diff) | |
parent | bc8f8f580bf356dace5fa0a0968f9d179d5e515a (diff) |
Merge "Add reason for stack creation failure"
Diffstat (limited to 'snaps/openstack/utils')
-rw-r--r-- | snaps/openstack/utils/heat_utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/snaps/openstack/utils/heat_utils.py b/snaps/openstack/utils/heat_utils.py index 6910bfe..8b9395b 100644 --- a/snaps/openstack/utils/heat_utils.py +++ b/snaps/openstack/utils/heat_utils.py @@ -87,6 +87,16 @@ def get_stack_status(heat_cli, stack_id): return heat_cli.stacks.get(stack_id).stack_status +def get_stack_status_reason(heat_cli, stack_id): + """ + Returns the current status of the Heat stack + :param heat_cli: the OpenStack heat client + :param stack_id: the ID of the heat stack to retrieve + :return: reason for stack creation failure + """ + return heat_cli.stacks.get(stack_id).stack_status_reason + + def create_stack(heat_cli, stack_settings): """ Executes an Ansible playbook to the given host |