From 1b9a8ad89dfc98ce86125b116f806a29dc37469e Mon Sep 17 00:00:00 2001 From: huangtianhua Date: Mon, 23 Mar 2015 12:00:47 +0800 Subject: [PATCH] Add function 'digest' doc Add function 'digest' guide doc in hot_spec.rst. Change-Id: Ia027a483c63f748437778d602eb04524a7489ea5 --- doc/source/template_guide/hot_spec.rst | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/doc/source/template_guide/hot_spec.rst b/doc/source/template_guide/hot_spec.rst index b5085b6b56..d3786d8324 100644 --- a/doc/source/template_guide/hot_spec.rst +++ b/doc/source/template_guide/hot_spec.rst @@ -153,6 +153,7 @@ For example, Heat currently supports the following values for the get_resource list_join repeat + digest resource_facade str_replace Fn::Select @@ -818,6 +819,40 @@ A sample use of this function with a simple list is shown below. This would resolve to "one, two, and three". +digest +-------- +The *digest* function allows for performing digest operations on a given value. +This function has been introduced in the Kilo release and is usable with HOT versions +later than `2015-04-30`. + +The syntax of the digest function is as follows: + +:: + + digest: + - + - + +algorithm + The digest algorithm. Valid algorithms are the ones + provided natively by hashlib (md5, sha1, sha224, sha256, sha384, + and sha512) or any one provided by OpenSSL. +value + The value to digest. This function will resolve to the corresponding hash of + the value. + + +An example of how to use the digest function is shown below: + +:: + + # from a user supplied parameter + pwd_hash: { digest: ['sha512', { get_param: raw_password }] } + +The value of the digest function would resolve to the corresponding hash of +the value of 'raw_password'. + + repeat ------ The *repeat* function allows for dynamically transforming lists by iterating