summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/utils/heat_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'snaps/openstack/utils/heat_utils.py')
-rw-r--r--snaps/openstack/utils/heat_utils.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/snaps/openstack/utils/heat_utils.py b/snaps/openstack/utils/heat_utils.py
index 0511ac8..d42eefa 100644
--- a/snaps/openstack/utils/heat_utils.py
+++ b/snaps/openstack/utils/heat_utils.py
@@ -65,7 +65,11 @@ def get_stack(heat_cli, stack_settings=None, stack_name=None):
stacks = heat_cli.stacks.list(**stack_filter)
for stack in stacks:
- return Stack(name=stack.identifier, stack_id=stack.id)
+ return Stack(
+ name=stack.identifier, stack_id=stack.id,
+ stack_project_id=stack.stack_user_project_id,
+ status=stack.stack_status,
+ status_reason=stack.stack_status_reason)
def get_stack_by_id(heat_cli, stack_id):
@@ -76,7 +80,11 @@ def get_stack_by_id(heat_cli, stack_id):
:return: the Stack domain object else None
"""
stack = heat_cli.stacks.get(stack_id)
- return Stack(name=stack.identifier, stack_id=stack.id)
+ return Stack(
+ name=stack.identifier, stack_id=stack.id,
+ stack_project_id=stack.stack_user_project_id,
+ status=stack.stack_status,
+ status_reason=stack.stack_status_reason)
def get_stack_status(heat_cli, stack_id):