From c3a83a877974ac0e8590e7a7d6fc8c818fee1395 Mon Sep 17 00:00:00 2001 From: pallavi Date: Mon, 23 May 2016 13:50:53 +0530 Subject: [PATCH] [api-ref] Added template-function-list Change-Id: I4a11f2937606131a9dd467ead87f9b6ad8c2df2d Closes-Bug: #1473814 --- api-ref/source/v1/parameters.yaml | 6 +++ .../template-functions-list-response.json | 44 +++++++++++++++++++ api-ref/source/v1/stack-templates.inc | 28 ++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 api-ref/source/v1/samples/template-functions-list-response.json diff --git a/api-ref/source/v1/parameters.yaml b/api-ref/source/v1/parameters.yaml index 9f8b42c1d9..01b1dd7b77 100644 --- a/api-ref/source/v1/parameters.yaml +++ b/api-ref/source/v1/parameters.yaml @@ -70,6 +70,12 @@ type_name: in: path required: false type: string +template_version: + description: | + The version of the heat template. + in: path + required: true + type: string # variables in query action_3: diff --git a/api-ref/source/v1/samples/template-functions-list-response.json b/api-ref/source/v1/samples/template-functions-list-response.json new file mode 100644 index 0000000000..0ee571233c --- /dev/null +++ b/api-ref/source/v1/samples/template-functions-list-response.json @@ -0,0 +1,44 @@ +{ + "template_functions": [ + { + "functions": "Fn::Select", + "description": "A function for selecting an item from a list or map." + }, + { + "functions": "repeat", + "description": "A function for iterating over a list of items." + }, + { + "functions": "resource_facade", + "description": "A function for retrieving data in a parent provider template." + }, + { + "functions": "list_join", + "description": "A function for joining strings." + }, + { + "functions": "str_replace", + "description": "A function for performing string substitutions." + }, + { + "functions": "get_attr", + "description": "A function for resolving resource attributes." + }, + { + "functions": "get_param", + "description": "A function for resolving parameter references." + }, + { + "functions": "get_file", + "description": "A function for including a file inline." + }, + { + "functions": "digest", + "description": "A function for performing digest operations." + }, + { + "functions": "get_resource", + "description": "A function for resolving resource references." + } + ] +} diff --git a/api-ref/source/v1/stack-templates.inc b/api-ref/source/v1/stack-templates.inc index aa5e229f65..f763978150 100644 --- a/api-ref/source/v1/stack-templates.inc +++ b/api-ref/source/v1/stack-templates.inc @@ -4,6 +4,34 @@ Templates ========= +List template functions +======================= + +.. rest_method:: GET /v1/{tenant_id}/template_versions/{template_version}/functions + +Lists all available functions for a template version. + + +Normal response codes: 200 +Error response codes:401,400, + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - tenant_id: tenant_id + - template_version: template_version + + +Response Example +---------------- + +.. literalinclude:: samples/template-functions-list-response.json + :language: javascript + +