diff options
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 |