Check that all templates are using the release alias
authorCarlos Camacho <ccamacho@redhat.com>
Tue, 17 Jan 2017 15:44:40 +0000 (16:44 +0100)
committerCarlos Camacho <ccamacho@redhat.com>
Wed, 18 Jan 2017 11:30:15 +0000 (12:30 +0100)
Quick verification to check that the release name
is used instead the date.

Im also adding here all the updated templates required
to pass the check and merge this check as soon as possible.

Change-Id: Ifdc9ac4a9d0a4872d3e21672c93fc87da2e68a4e

puppet/services/cinder-hpelefthand-iscsi.yaml
tools/yaml-validate.py

index f22a3ae..ca7d283 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: 2017-02-24
+heat_template_version: ocata
 
 description: >
   Configure Cinder HPELeftHandISCSIDriver
index f2359af..63e3ce5 100755 (executable)
@@ -94,6 +94,10 @@ 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'