summaryrefslogtreecommitdiff
path: root/heatclient
diff options
context:
space:
mode:
authorThomas Herve <therve@redhat.com>2018-06-07 18:13:48 +0200
committerThomas Herve <therve@redhat.com>2018-06-07 18:13:48 +0200
commit0b46b2089c8ec26a2e662538f513d76cb05ca47a (patch)
tree4c01b309f526071fc07cd4172e7d0faba433f9fc /heatclient
parente385cae3ac4d404982c9672424667fadeb867726 (diff)
downloadpython-heatclient-0b46b2089c8ec26a2e662538f513d76cb05ca47a.tar.gz
Mark stacks returned by get loaded
When calling stacks.get, mark the returning stacks as loaded, so that attribute retrieval works right away. If not, any getattr on the Stack will call get() which will request the stack again (and ignore things like resolve_outputs). Change-Id: I3a3f25aa0c6f88e7e4274107c0578fd30dc9f155 Related-Bug: #1774958
Diffstat (limited to 'heatclient')
-rw-r--r--heatclient/v1/stacks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/heatclient/v1/stacks.py b/heatclient/v1/stacks.py
index 1a76286..2484ff4 100644
--- a/heatclient/v1/stacks.py
+++ b/heatclient/v1/stacks.py
@@ -279,7 +279,7 @@ class StackManager(StackChildManager):
kwargs['params'] = {"resolve_outputs": False}
resp = self.client.get('/stacks/%s' % stack_id, **kwargs)
body = utils.get_response_body(resp)
- return Stack(self, body.get('stack'))
+ return Stack(self, body.get('stack'), loaded=True)
def template(self, stack_id):
"""Get template content for a specific stack as a parsed JSON object.