Add Rocky versions

* Add Rocky code name
* Add new HOT version for Rocky release
The new version is "2018-08-31" or "rocky".
* Add sem-ver flag
Sem-Ver: api-break

Change-Id: I261b6c28b8b7ee9e75ca9a895155a656ef82cd0d
This commit is contained in:
ricolin 2018-03-01 05:26:05 +08:00
parent 03832aedee
commit 6665d9989f
6 changed files with 110 additions and 4 deletions

View File

@ -36,7 +36,8 @@ _CODE_NAMES = {'2013.1': 'Grizzly',
'7.0.0': 'Newton',
'8.0.0': 'Ocata',
'9.0.0': 'Pike',
'10.0.0': 'Queens'}
'10.0.0': 'Queens',
'11.0.0': 'Rocky'}
all_resources = {}

View File

@ -372,6 +372,44 @@ for the ``heat_template_version`` key:
yaql
contains
2018-08-31 | rocky
-------------------
The key with value ``2018-08-31`` or ``rocky`` indicates that the YAML
document is a HOT template and it may contain features added and/or removed
up until the Queens release. The complete list of supported functions is::
digest
filter
get_attr
get_file
get_param
get_resource
list_join
make_url
list_concat
list_concat_unique
contains
map_merge
map_replace
repeat
resource_facade
str_replace
str_replace_strict
str_replace_vstrict
str_split
yaql
if
The complete list of supported condition functions is::
equals
get_param
not
and
or
yaql
contains
.. _hot_spec_parameter_groups:
Parameter groups section

View File

@ -697,3 +697,66 @@ class HOTemplate20180302(HOTemplate20170901):
}
param_schema_class = parameters.HOTParamSchema20180302
class HOTemplate20180831(HOTemplate20180302):
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.RepeatWithNestedLoop,
'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 added in 2017-09-01
'make_url': hot_funcs.MakeURL,
'list_concat': hot_funcs.ListConcat,
'str_replace_vstrict': hot_funcs.ReplaceJsonVeryStrict,
'list_concat_unique': hot_funcs.ListConcatUnique,
'contains': hot_funcs.Contains,
# 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,
}
condition_functions = {
'get_param': hot_funcs.GetParam,
'equals': hot_funcs.Equals,
'not': hot_funcs.Not,
'and': hot_funcs.And,
'or': hot_funcs.Or,
# functions added in 2017-09-01
'yaql': hot_funcs.Yaql,
'contains': hot_funcs.Contains
}

View File

@ -734,8 +734,9 @@ class TemplateTest(common.HeatTestCase):
valid_versions = ['2013-05-23', '2014-10-16',
'2015-04-30', '2015-10-15', '2016-04-08',
'2016-10-14', '2017-02-24', '2017-09-01',
'2018-03-02',
'newton', 'ocata', 'pike', 'queens']
'2018-03-02', '2018-08-31',
'newton', 'ocata', 'pike',
'queens', 'rocky']
ex_error_msg = ('The template version is invalid: '
'"heat_template_version: 2012-12-12". '
'"heat_template_version" should be one of: %s'

View File

@ -25,7 +25,8 @@ class TemplateVersionTest(functional_base.FunctionalTestsBase):
"2016-04-08", "2016-10-14", "newton",
"2017-02-24", "ocata",
"2017-09-01", "pike",
"2018-03-02", "queens"]
"2018-03-02", "queens",
"2018-08-31", "rocky"]
for template in template_versions:
self.assertIn(template.version.split(".")[1],
supported_template_versions)

View File

@ -186,6 +186,8 @@ heat.templates =
heat_template_version.pike = heat.engine.hot.template:HOTemplate20170901
heat_template_version.2018-03-02 = heat.engine.hot.template:HOTemplate20180302
heat_template_version.queens = heat.engine.hot.template:HOTemplate20180302
heat_template_version.2018-08-31 = heat.engine.hot.template:HOTemplate20180831
heat_template_version.rocky = heat.engine.hot.template:HOTemplate20180831
[global]
setup-hooks =