diff --git a/doc/source/template_guide/hot_spec.rst b/doc/source/template_guide/hot_spec.rst index 471fe26ab7..8f099dac3b 100644 --- a/doc/source/template_guide/hot_spec.rst +++ b/doc/source/template_guide/hot_spec.rst @@ -289,6 +289,37 @@ for the ``heat_template_version`` key: and or +2017-09-01 | pike +------------------- + The key with value ``2017-09-01`` or ``pike`` indicates that the YAML + document is a HOT template and it may contain features added and/or removed + up until the Pike release. The complete list of supported functions is:: + + digest + filter + get_attr + get_file + get_param + get_resource + list_join + map_merge + map_replace + repeat + resource_facade + str_replace + str_replace_strict + str_split + yaql + if + + The complete list of supported condition functions is:: + + equals + get_param + not + and + or + .. _hot_spec_parameter_groups: Parameter groups section diff --git a/heat/engine/hot/template.py b/heat/engine/hot/template.py index 15ce69d443..72b990bdb1 100644 --- a/heat/engine/hot/template.py +++ b/heat/engine/hot/template.py @@ -557,3 +557,47 @@ class HOTemplate20170224(HOTemplate20161014): } param_schema_class = parameters.HOTParamSchema20170224 + + +class HOTemplate20170901(HOTemplate20170224): + functions = { + 'get_attr': hot_funcs.GetAttAllAttributes, + 'get_file': hot_funcs.GetFile, + 'get_param': hot_funcs.GetParam, + 'get_resource': hot_funcs.GetResource, + 'list_join': hot_funcs.JoinMultiple, + 'repeat': hot_funcs.RepeatWithMap, + 'resource_facade': hot_funcs.ResourceFacade, + 'str_replace': hot_funcs.ReplaceJson, + + # functions added in 2015-04-30 + 'digest': hot_funcs.Digest, + + # functions added in 2015-10-15 + 'str_split': hot_funcs.StrSplit, + + # functions added in 2016-04-08 + 'map_merge': hot_funcs.MapMerge, + + # functions added in 2016-10-14 + 'yaql': hot_funcs.Yaql, + 'map_replace': hot_funcs.MapReplace, + 'if': hot_funcs.If, + + # functions added in 2017-02-24 + 'filter': hot_funcs.Filter, + 'str_replace_strict': hot_funcs.ReplaceJsonStrict, + + # functions removed from 2015-10-15 + 'Fn::Select': hot_funcs.Removed, + + # functions removed from 2014-10-16 + 'Fn::GetAZs': hot_funcs.Removed, + 'Fn::Join': hot_funcs.Removed, + 'Fn::Split': hot_funcs.Removed, + 'Fn::Replace': hot_funcs.Removed, + 'Fn::Base64': hot_funcs.Removed, + 'Fn::MemberListToMap': hot_funcs.Removed, + 'Fn::ResourceFacade': hot_funcs.Removed, + 'Ref': hot_funcs.Removed, + } diff --git a/heat/tests/test_hot.py b/heat/tests/test_hot.py index 43057acada..23acebd8be 100644 --- a/heat/tests/test_hot.py +++ b/heat/tests/test_hot.py @@ -68,6 +68,10 @@ hot_ocata_tpl_empty = template_format.parse(''' heat_template_version: 2017-02-24 ''') +hot_pike_tpl_empty = template_format.parse(''' +heat_template_version: 2017-09-01 +''') + hot_tpl_empty_sections = template_format.parse(''' heat_template_version: 2013-05-23 parameters: diff --git a/heat/tests/test_template.py b/heat/tests/test_template.py index a409d68483..777c27961c 100644 --- a/heat/tests/test_template.py +++ b/heat/tests/test_template.py @@ -728,7 +728,8 @@ class TemplateTest(common.HeatTestCase): template.Template, invalid_hot_version_tmp) valid_versions = ['2013-05-23', '2014-10-16', '2015-04-30', '2015-10-15', '2016-04-08', - '2016-10-14', '2017-02-24', 'newton', 'ocata'] + '2016-10-14', '2017-02-24', '2017-09-01', + 'newton', 'ocata', 'pike'] ex_error_msg = ('The template version is invalid: ' '"heat_template_version: 2012-12-12". ' '"heat_template_version" should be one of: %s' diff --git a/heat_integrationtests/functional/test_templates.py b/heat_integrationtests/functional/test_templates.py index 8464d199ea..80ce68527d 100644 --- a/heat_integrationtests/functional/test_templates.py +++ b/heat_integrationtests/functional/test_templates.py @@ -52,7 +52,8 @@ class TemplateAPITest(functional_base.FunctionalTestsBase): "2015-04-30", "2015-10-15", "2012-12-12", "2010-09-09", "2016-04-08", "2016-10-14", "newton", - "2017-02-24", "ocata"] + "2017-02-24", "ocata", + "2017-09-01", "pike"] for template in template_versions: self.assertIn(template.version.split(".")[1], supported_template_versions) diff --git a/setup.cfg b/setup.cfg index 79b9da3a0a..c2092662c2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -170,6 +170,8 @@ heat.templates = heat_template_version.newton = heat.engine.hot.template:HOTemplate20161014 heat_template_version.2017-02-24 = heat.engine.hot.template:HOTemplate20170224 heat_template_version.ocata = heat.engine.hot.template:HOTemplate20170224 + heat_template_version.2017-09-01 = heat.engine.hot.template:HOTemplate20170901 + heat_template_version.pike = heat.engine.hot.template:HOTemplate20170901 tempest.test_plugins = heat_tests = heat_integrationtests.plugin:HeatTempestPlugin