aboutsummaryrefslogtreecommitdiffstats
path: root/tools/yaml-validate.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/yaml-validate.py')
-rwxr-xr-xtools/yaml-validate.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py
index 19e40d19..1d0dba02 100755
--- a/tools/yaml-validate.py
+++ b/tools/yaml-validate.py
@@ -62,7 +62,8 @@ def validate_mysql_connection(settings):
return items == ['EndpointMap', 'MysqlInternal', 'protocol']
def client_bind_address(item):
- return 'bind_address' in item
+ return 'read_default_file' in item and \
+ 'read_default_group' in item
def validate_mysql_uri(key, items):
# Only consider a connection if it targets mysql
@@ -94,10 +95,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 +132,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)