summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/ComputeHCI.yaml45
-rwxr-xr-xtools/yaml-validate.py25
2 files changed, 67 insertions, 3 deletions
diff --git a/roles/ComputeHCI.yaml b/roles/ComputeHCI.yaml
new file mode 100644
index 00000000..a04a12e1
--- /dev/null
+++ b/roles/ComputeHCI.yaml
@@ -0,0 +1,45 @@
+###############################################################################
+# Role: ComputeHCI #
+###############################################################################
+- name: ComputeHCI
+ description: |
+ Compute Node role hosting Ceph OSD too
+ networks:
+ - InternalApi
+ - Tenant
+ - Storage
+ - StorageMgmt
+ disable_upgrade_deployment: True
+ ServicesDefault:
+ - OS::TripleO::Services::AuditD
+ - OS::TripleO::Services::CACerts
+ - OS::TripleO::Services::CephClient
+ - OS::TripleO::Services::CephExternal
+ - OS::TripleO::Services::CephOSD
+ - OS::TripleO::Services::CertmongerUser
+ - OS::TripleO::Services::Collectd
+ - OS::TripleO::Services::ComputeCeilometerAgent
+ - OS::TripleO::Services::ComputeNeutronCorePlugin
+ - OS::TripleO::Services::ComputeNeutronL3Agent
+ - OS::TripleO::Services::ComputeNeutronMetadataAgent
+ - OS::TripleO::Services::ComputeNeutronOvsAgent
+ - OS::TripleO::Services::Docker
+ - OS::TripleO::Services::FluentdClient
+ - OS::TripleO::Services::Iscsid
+ - OS::TripleO::Services::Kernel
+ - OS::TripleO::Services::MySQLClient
+ - OS::TripleO::Services::NeutronLinuxbridgeAgent
+ - OS::TripleO::Services::NeutronSriovAgent
+ - OS::TripleO::Services::NeutronVppAgent
+ - OS::TripleO::Services::NovaCompute
+ - OS::TripleO::Services::NovaLibvirt
+ - OS::TripleO::Services::Ntp
+ - OS::TripleO::Services::OpenDaylightOvs
+ - OS::TripleO::Services::Securetty
+ - OS::TripleO::Services::SensuClient
+ - OS::TripleO::Services::Snmp
+ - OS::TripleO::Services::Sshd
+ - OS::TripleO::Services::Timezone
+ - OS::TripleO::Services::TripleoFirewall
+ - OS::TripleO::Services::TripleoPackages
+ - OS::TripleO::Services::Vpp
diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py
index 674449f5..da579c2d 100755
--- a/tools/yaml-validate.py
+++ b/tools/yaml-validate.py
@@ -98,14 +98,30 @@ 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')
roles_filename = os.path.join(os.path.dirname(env_filename),
- '../roles_data.yaml')
+ '../roles/Compute.yaml')
roles_tpl = yaml.load(open(roles_filename).read())
for role in roles_tpl:
if role['name'] == 'Compute':
roles_services_list = role['ServicesDefault']
if sorted(env_services_list) != sorted(roles_services_list):
- print('ERROR: ComputeServices in %s is different '
- 'from ServicesDefault in roles_data.yaml' % env_filename)
+ print('ERROR: ComputeServices in %s is different from '
+ 'ServicesDefault in roles/Compute.yaml' % env_filename)
+ return 1
+ return 0
+
+
+def validate_hci_computehci_role(hci_role_filename, hci_role_tpl):
+ compute_role_filename = os.path.join(os.path.dirname(hci_role_filename),
+ './Compute.yaml')
+ compute_role_tpl = yaml.load(open(compute_role_filename).read())
+ compute_role_services = compute_role_tpl[0]['ServicesDefault']
+ for role in hci_role_tpl:
+ if role['name'] == 'ComputeHCI':
+ hci_role_services = role['ServicesDefault']
+ hci_role_services.remove('OS::TripleO::Services::CephOSD')
+ if sorted(hci_role_services) != sorted(compute_role_services):
+ print('ERROR: ServicesDefault in %s is different from'
+ 'ServicesDefault in roles/Compute.yaml' % hci_role_filename)
return 1
return 0
@@ -305,6 +321,9 @@ def validate(filename, param_map):
if filename.endswith('hyperconverged-ceph.yaml'):
retval = validate_hci_compute_services_default(filename, tpl)
+ if filename.startswith('./roles/ComputeHCI.yaml'):
+ retval = validate_hci_computehci_role(filename, tpl)
+
except Exception:
print(traceback.format_exc())
return 1