From ab57f5478a1b26ff80fb9372a184dd7e2a9837fc Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Wed, 20 Jul 2016 08:46:36 +0100 Subject: [PATCH] Add reno for map_replace and fix docs nit I missed adding the reno in https://review.openstack.org/#/c/343731/ and there was a minor docs nit mentiond also. Change-Id: Ib78ca19b96a239c0a06758c259e2e74e10ed26e5 --- doc/source/template_guide/hot_spec.rst | 2 +- .../notes/map-replace-function-26bf247c620f64bf.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/map-replace-function-26bf247c620f64bf.yaml diff --git a/doc/source/template_guide/hot_spec.rst b/doc/source/template_guide/hot_spec.rst index e3c64c320..934f4b061 100644 --- a/doc/source/template_guide/hot_spec.rst +++ b/doc/source/template_guide/hot_spec.rst @@ -1327,7 +1327,7 @@ This resolves to a map containing ``{'K1': 'v1', 'k2': 'V2'}``. The keys/values mappings are optional, either or both may be specified. Note that an error is raised if a replacement defined in "keys" results -in a collision with an existing keys in the input map. +in a collision with an existing keys in the input or output map. yaql ---- diff --git a/releasenotes/notes/map-replace-function-26bf247c620f64bf.yaml b/releasenotes/notes/map-replace-function-26bf247c620f64bf.yaml new file mode 100644 index 000000000..51e0c3ee1 --- /dev/null +++ b/releasenotes/notes/map-replace-function-26bf247c620f64bf.yaml @@ -0,0 +1,7 @@ +--- + features: + - Add ``map_replace`` function, that takes 2 arguments + an input map and a map containing a ``keys`` and/or + ``values`` map. key/value substitutions on the input + map are performed based on the mappings passed in + ``keys`` and ``values``.