diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-02-03 09:20:41 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-02-03 09:20:41 +0000 |
commit | ec24ed7dd82fd4c1553085719e369b545c4beedd (patch) | |
tree | d19f1a3a57d5b386e1540a9e697ab626237dd10d | |
parent | 9bb44e0a323ed03549ca189d2219122f883ebd2f (diff) | |
parent | e5d594ea2de6c4b387f32d0a6cea49accf940454 (diff) |
Merge "Moving the validation for using the template alias version for all templates"
-rw-r--r-- | ci/common/net-config-multinode-os-net-config.yaml | 2 | ||||
-rw-r--r-- | ci/pingtests/tenantvm_floatingip.yaml | 2 | ||||
-rwxr-xr-x | tools/yaml-validate.py | 11 |
3 files changed, 9 insertions, 6 deletions
diff --git a/ci/common/net-config-multinode-os-net-config.yaml b/ci/common/net-config-multinode-os-net-config.yaml index 227c5da2..8c50b641 100644 --- a/ci/common/net-config-multinode-os-net-config.yaml +++ b/ci/common/net-config-multinode-os-net-config.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2016-10-14 +heat_template_version: ocata description: > Software Config to drive os-net-config for a simple bridge configured diff --git a/ci/pingtests/tenantvm_floatingip.yaml b/ci/pingtests/tenantvm_floatingip.yaml index 0f31bc16..b910d6c1 100644 --- a/ci/pingtests/tenantvm_floatingip.yaml +++ b/ci/pingtests/tenantvm_floatingip.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2013-05-23 +heat_template_version: ocata description: > This template resides in tripleo-ci for Mitaka CI jobs only. diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index 19e40d19..2769c152 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -94,10 +94,6 @@ def validate_mysql_connection(settings): def validate_service(filename, tpl): - if 'heat_template_version' in tpl and not str(tpl['heat_template_version']).isalpha(): - print('ERROR: heat_template_version needs to be the release alias not a date: %s' - % filename) - return 1 if 'outputs' in tpl and 'role_data' in tpl['outputs']: if 'value' not in tpl['outputs']['role_data']: print('ERROR: invalid role_data for filename: %s' @@ -135,6 +131,13 @@ def validate(filename): try: tpl = yaml.load(open(filename).read()) + # The template alias version should be used instead a date, this validation + # will be applied to all templates not just for those in the services folder. + if 'heat_template_version' in tpl and not str(tpl['heat_template_version']).isalpha(): + print('ERROR: heat_template_version needs to be the release alias not a date: %s' + % filename) + return 1 + if (filename.startswith('./puppet/services/') and filename != './puppet/services/services.yaml'): retval = validate_service(filename, tpl) |