diff --git a/roles/ControllerStorageNfs.yaml b/roles/ControllerStorageNfs.yaml index d47b9c9b15..b6dba3f639 100644 --- a/roles/ControllerStorageNfs.yaml +++ b/roles/ControllerStorageNfs.yaml @@ -1,7 +1,7 @@ ############################################################################### -# Role: Controller # +# Role: ControllerStorageNfs # ############################################################################### -- name: Controller +- name: ControllerStorageNfs description: | Controller role that has all the controler services loaded and handles Database, Messaging and Network functions. diff --git a/roles/UndercloudLight.yaml b/roles/UndercloudLight.yaml index dbf53b6d14..596f5d718c 100644 --- a/roles/UndercloudLight.yaml +++ b/roles/UndercloudLight.yaml @@ -1,7 +1,7 @@ ############################################################################### -# Role: Undercloud # +# Role: UndercloudLight # ############################################################################### -- name: Undercloud +- name: UndercloudLight description: | EXPERIMENTAL. A role to deploy the minimal undercloud for pre-provisioned deployed servers via heat using the 'openstack undercloud deploy' command. diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py index 945f1563c4..57cb3f6561 100755 --- a/tools/yaml-validate.py +++ b/tools/yaml-validate.py @@ -245,6 +245,15 @@ def validate_endpoint_map(base_map, env_map): return sorted(base_map.keys()) == sorted(env_map.keys()) +def validate_role_name(filename): + role_data = yaml.load(open(filename).read())[0] + if role_data['name'] != os.path.basename(filename).split('.')[0]: + print('ERROR: role name should match file name for role : %s.' + % filename) + return 1 + return 0 + + def validate_hci_compute_services_default(env_filename, env_tpl): env_services_list = env_tpl['parameter_defaults']['ComputeServices'] env_services_list.remove('OS::TripleO::Services::CephOSD') @@ -931,6 +940,9 @@ def validate(filename, param_map): if filename.endswith('hyperconverged-ceph.yaml'): retval |= validate_hci_compute_services_default(filename, tpl) + if filename.startswith('./roles/'): + retval = validate_role_name(filename) + if filename.startswith('./roles/ComputeHCI.yaml'): retval |= validate_hci_computehci_role(filename, tpl)