Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Add CephGrafana resource to the ControllerStorageNFS role" int…
Browse files Browse the repository at this point in the history
…o stable/train
  • Loading branch information
Zuul authored and openstack-gerrit committed Dec 17, 2019
2 parents 8364279 + 0ab43fd commit 2968e1f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
5 changes: 2 additions & 3 deletions roles/ControllerStorageDashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
- OS::TripleO::Services::Ec2Api
- OS::TripleO::Services::Etcd
- OS::TripleO::Services::ExternalSwiftProxy
- OS::TripleO::Services::Fluentd
- OS::TripleO::Services::GlanceApi
- OS::TripleO::Services::GnocchiApi
- OS::TripleO::Services::GnocchiMetricd
Expand Down Expand Up @@ -141,6 +140,7 @@
- OS::TripleO::Services::NeutronML2FujitsuFossw
- OS::TripleO::Services::NeutronOvsAgent
- OS::TripleO::Services::NeutronVppAgent
- OS::TripleO::Services::NeutronAgentsIBConfig
- OS::TripleO::Services::NovaApi
- OS::TripleO::Services::NovaConductor
- OS::TripleO::Services::NovaIronic
Expand All @@ -153,11 +153,11 @@
- OS::TripleO::Services::OctaviaHealthManager
- OS::TripleO::Services::OctaviaHousekeeping
- OS::TripleO::Services::OctaviaWorker
- OS::TripleO::Services::OpenStackClients
- OS::TripleO::Services::OVNDBs
- OS::TripleO::Services::OVNController
- OS::TripleO::Services::Pacemaker
- OS::TripleO::Services::PlacementApi
- OS::TripleO::Services::OpenStackClients
- OS::TripleO::Services::OsloMessagingRpc
- OS::TripleO::Services::OsloMessagingNotify
- OS::TripleO::Services::Podman
Expand All @@ -183,4 +183,3 @@
- OS::TripleO::Services::Tuned
- OS::TripleO::Services::Vpp
- OS::TripleO::Services::Zaqar

4 changes: 3 additions & 1 deletion roles/ControllerStorageNfs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
- OS::TripleO::Services::CeilometerAgentCentral
- OS::TripleO::Services::CeilometerAgentNotification
- OS::TripleO::Services::CephExternal
- OS::TripleO::Services::CephGrafana
- OS::TripleO::Services::CephMds
- OS::TripleO::Services::CephMgr
- OS::TripleO::Services::CephMon
Expand Down Expand Up @@ -140,6 +141,7 @@
- OS::TripleO::Services::NeutronML2FujitsuFossw
- OS::TripleO::Services::NeutronOvsAgent
- OS::TripleO::Services::NeutronVppAgent
- OS::TripleO::Services::NeutronAgentsIBConfig
- OS::TripleO::Services::NovaApi
- OS::TripleO::Services::NovaConductor
- OS::TripleO::Services::NovaIronic
Expand All @@ -152,11 +154,11 @@
- OS::TripleO::Services::OctaviaHealthManager
- OS::TripleO::Services::OctaviaHousekeeping
- OS::TripleO::Services::OctaviaWorker
- OS::TripleO::Services::OpenStackClients
- OS::TripleO::Services::OVNDBs
- OS::TripleO::Services::OVNController
- OS::TripleO::Services::Pacemaker
- OS::TripleO::Services::PlacementApi
- OS::TripleO::Services::OpenStackClients
- OS::TripleO::Services::OsloMessagingRpc
- OS::TripleO::Services::OsloMessagingNotify
- OS::TripleO::Services::Podman
Expand Down
25 changes: 25 additions & 0 deletions tools/yaml-validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,23 @@ def validate_controller_dashboard(filename, tpl):
return 0


def validate_controller_storage_nfs(filename, tpl, exclude_service=()):
control_role_filename = os.path.join(os.path.dirname(filename),
'./Controller.yaml')
with open(control_role_filename, 'r') as f:
control_role_tpl = yaml.load(f.read(), Loader=yaml.SafeLoader)

control_role_services = control_role_tpl[0]['ServicesDefault']
for role in tpl:
if role['name'] == 'ControllerStorageNfs':
services = [x for x in role['ServicesDefault'] if (x not in exclude_service)]
if sorted(services) != sorted(control_role_services):
print('ERROR: ServicesDefault in %s is different from '
'ServicesDefault in roles/Controller.yaml' % filename)
return 1
return 0


def validate_hci_role(hci_role_filename, hci_role_tpl):
role_files = ['HciCephAll', 'HciCephFile', 'HciCephMon', 'HciCephObject']
if hci_role_filename in ['./roles/' + x + '.yaml' for x in role_files]:
Expand Down Expand Up @@ -1108,6 +1125,14 @@ def validate(filename, param_map):
filename.startswith('./roles/ComputeHCIOvsDpdk.yaml'):
retval |= validate_hci_computehci_role(filename, tpl)

if filename.startswith('./roles/ControllerStorageNfs.yaml'):
exclude = [
'OS::TripleO::Services::CephNfs']
retval |= validate_controller_storage_nfs(filename, tpl, exclude)

if filename.startswith('./roles/ControllerStorageDashboard.yaml'):
retval |= validate_controller_dashboard(filename, tpl)

if filename.startswith('./roles/ComputeOvsDpdk.yaml') or \
filename.startswith('./roles/ComputeSriov.yaml') or \
filename.startswith('./roles/ComputeOvsDpdkRT.yaml') or \
Expand Down

0 comments on commit 2968e1f

Please sign in to comment.