summaryrefslogtreecommitdiff
path: root/heat/api
diff options
context:
space:
mode:
authorSteven Hardy <shardy@redhat.com>2016-06-08 12:52:29 +0100
committerSteven Hardy <shardy@redhat.com>2016-07-11 18:02:59 +0100
commit316b5b6381be251139a721d4e96b085050192426 (patch)
treed3db144a0f8912f6ce7fdc1e2de323eb0930e454 /heat/api
parent5dc4d26b7f19d28afe59dbcfe5fd96051c625794 (diff)
downloadheat-316b5b6381be251139a721d4e96b085050192426.tar.gz
Add stack files retrieval API
Similar to the recent addition that enables retrieval of the current environment for a stack, this enables reading the current files map for a running stack, which is useful if you want to introspect the current state, and/or deploy another similar stack without necessarily having the exact command/repo used initially. APIImpact Implements: blueprint files-show Change-Id: I3198b6a7dc06648af24c198d39470f3b0d5d6f11
Diffstat (limited to 'heat/api')
-rw-r--r--heat/api/openstack/v1/__init__.py8
-rw-r--r--heat/api/openstack/v1/stacks.py5
2 files changed, 12 insertions, 1 deletions
diff --git a/heat/api/openstack/v1/__init__.py b/heat/api/openstack/v1/__init__.py
index 8162a6725..7a782f1f0 100644
--- a/heat/api/openstack/v1/__init__.py
+++ b/heat/api/openstack/v1/__init__.py
@@ -171,7 +171,7 @@ class API(wsgi.Router):
'name': 'stack_lookup_subpath',
'url': '/stacks/{stack_name}/'
'{path:resources|events|template|actions'
- '|environment}',
+ '|environment|files}',
'action': 'lookup',
'method': 'GET'
},
@@ -200,6 +200,12 @@ class API(wsgi.Router):
'action': 'environment',
'method': 'GET'
},
+ {
+ 'name': 'stack_lookup',
+ 'url': '/stacks/{stack_name}/{stack_id}/files',
+ 'action': 'files',
+ 'method': 'GET'
+ },
# Stack update/delete
{
diff --git a/heat/api/openstack/v1/stacks.py b/heat/api/openstack/v1/stacks.py
index 31f909e7f..003d65aed 100644
--- a/heat/api/openstack/v1/stacks.py
+++ b/heat/api/openstack/v1/stacks.py
@@ -464,6 +464,11 @@ class StackController(object):
return env
@util.identified_stack
+ def files(self, req, identity):
+ """Get the files for an existing stack."""
+ return self.rpc_client.get_files(req.context, identity)
+
+ @util.identified_stack
def update(self, req, identity, body):
"""Update an existing stack with a new template and/or parameters."""
data = InstantiationData(body)