Add function 'digest' doc

Add function 'digest' guide doc in hot_spec.rst.

Change-Id: Ia027a483c63f748437778d602eb04524a7489ea5
This commit is contained in:
huangtianhua 2015-03-23 12:00:47 +08:00
parent 1e6b0ba66c
commit 1b9a8ad89d
1 changed files with 35 additions and 0 deletions

View File

@ -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>
- <value>
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