diff options
author | Steven Hardy <shardy@redhat.com> | 2016-07-28 10:30:10 +0100 |
---|---|---|
committer | Steven Hardy <shardy@redhat.com> | 2016-07-28 16:31:36 +0100 |
commit | 7df649f59e3cb3d0b811b526b4fdb000337e01de (patch) | |
tree | 1d32d2dbd5b66a26ed949e05a918d207c45843e8 /tools | |
parent | fc93cf3e2965f430b243eda1e95ce30c4e59a1ab (diff) |
Convert service_name to underscore syntax
Currently we use hyphens, e.g cinder-api, but in overcloud.yaml
we have a lot of references to services (e.g for AllNodesConfig)
by underscore, e.g cinder_api. To enable dynamic generation of
this data, we need the service name in underscore format.
Change-Id: Ief13dfe5d8d7691dfe2534ad5c39d7eacbcb6f70
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/yaml-validate.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index 34219eff..c93c84bc 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -33,8 +33,9 @@ def validate_service(filename, tpl): print('ERROR: service_name is required in role_data for %s.' % filename) return 1 + # service_name must match the filename, but with an underscore if (role_data['service_name'] != - os.path.basename(filename).split('.')[0]): + os.path.basename(filename).split('.')[0].replace("-", "_")): print('ERROR: service_name should match file name for service: %s.' % filename) return 1 |