Browse Source

Merge "Make groups documentation part dynamic"

tags/12.1.0
Zuul 2 weeks ago
parent
commit
03ce449f66
51 changed files with 158 additions and 171 deletions
  1. +1
    -0
      doc/requirements.txt
  2. +49
    -8
      doc/source/_exts/generate_validations_doc.py
  3. +2
    -1
      doc/source/index.rst
  4. +12
    -65
      doc/source/readme.rst
  5. +2
    -2
      doc/source/roles/role-advanced_format_512e_support.rst
  6. +2
    -2
      doc/source/roles/role-ceilometerdb_size.rst
  7. +2
    -2
      doc/source/roles/role-check_latest_packages_version.rst
  8. +2
    -2
      doc/source/roles/role-check_network_gateway.rst
  9. +2
    -2
      doc/source/roles/role-collect_flavors_and_verify_profiles.rst
  10. +2
    -2
      doc/source/roles/role-container_status.rst
  11. +2
    -2
      doc/source/roles/role-containerized_undercloud_docker.rst
  12. +2
    -2
      doc/source/roles/role-controller_token.rst
  13. +2
    -2
      doc/source/roles/role-controller_ulimits.rst
  14. +2
    -2
      doc/source/roles/role-ctlplane_ip_range.rst
  15. +2
    -2
      doc/source/roles/role-default_node_count.rst
  16. +2
    -2
      doc/source/roles/role-dhcp_validations.rst
  17. +2
    -2
      doc/source/roles/role-healthcheck_service_status.rst
  18. +2
    -2
      doc/source/roles/role-image_serve.rst
  19. +2
    -2
      doc/source/roles/role-ironic_boot_configuration.rst
  20. +2
    -2
      doc/source/roles/role-mysql_open_files_limit.rst
  21. +2
    -2
      doc/source/roles/role-network_environment.rst
  22. +2
    -2
      doc/source/roles/role-neutron_sanity_check.rst
  23. +2
    -2
      doc/source/roles/role-no_op.rst
  24. +1
    -2
      doc/source/roles/role-no_op_firewall_nova_driver.rst
  25. +2
    -2
      doc/source/roles/role-node_disks.rst
  26. +2
    -2
      doc/source/roles/role-node_health.rst
  27. +2
    -2
      doc/source/roles/role-nova_event_callback.rst
  28. +2
    -2
      doc/source/roles/role-nova_status.rst
  29. +2
    -2
      doc/source/roles/role-openshift_on_openstack.rst
  30. +2
    -2
      doc/source/roles/role-openstack_endpoints.rst
  31. +2
    -2
      doc/source/roles/role-ovs_dpdk_pmd.rst
  32. +2
    -2
      doc/source/roles/role-pacemaker_status.rst
  33. +2
    -2
      doc/source/roles/role-rabbitmq_limits.rst
  34. +2
    -2
      doc/source/roles/role-service_status.rst
  35. +2
    -2
      doc/source/roles/role-stack_health.rst
  36. +2
    -2
      doc/source/roles/role-stonith_exists.rst
  37. +2
    -2
      doc/source/roles/role-switch_vlans.rst
  38. +2
    -2
      doc/source/roles/role-tls_everywhere.rst
  39. +0
    -7
      doc/source/roles/role-undercloud-ram.rst
  40. +2
    -2
      doc/source/roles/role-undercloud_cpu.rst
  41. +2
    -2
      doc/source/roles/role-undercloud_debug.rst
  42. +2
    -2
      doc/source/roles/role-undercloud_disk_space.rst
  43. +2
    -2
      doc/source/roles/role-undercloud_heat_purge_deleted.rst
  44. +2
    -2
      doc/source/roles/role-undercloud_process_count.rst
  45. +7
    -0
      doc/source/roles/role-undercloud_ram.rst
  46. +2
    -2
      doc/source/roles/role-undercloud_selinux_mode.rst
  47. +2
    -2
      doc/source/roles/role-undercloud_service_status.rst
  48. +2
    -3
      doc/source/roles/role-undercloud_tokenflush.rst
  49. +2
    -2
      doc/source/roles/role-validate_selinux.rst
  50. +2
    -2
      doc/source/roles/role-xfs_check_ftype.rst
  51. +0
    -1
      tox.ini

+ 1
- 0
doc/requirements.txt View File

@@ -5,3 +5,4 @@ openstackdocstheme>=1.29.2 # Apache-2.0
reno>=2.11.3 # Apache-2.0
doc8>=0.8.0 # Apache-2.0
bashate>=0.6.0 # Apache-2.0
six>=1.11.0 # MIT

+ 49
- 8
doc/source/_exts/generate_validations_doc.py View File

@@ -14,7 +14,7 @@

from glob import glob
import os
import six
import yaml

DEFAULT_METADATA = {
@@ -113,18 +113,59 @@ Role documentation
f.write("\n".join(entries))


def build_groups_detail(groups):
entries = [
"""
{group}
{adornment}

{desc}

.. include:: {link}

"""
.format(group=grp.capitalize(),
adornment=(len(grp) * '~'),
link="validations-{}.rst".format(grp),
desc=desc[0].get('description', None),
)
for grp, desc in sorted(groups.items())]
with open('doc/source/validations-groups.rst', 'w') as f:
f.write("\n".join(entries))


def parse_groups_file():
contents = {}
groups_file_path = os.path.abspath('groups.yaml')

if os.path.exists(groups_file_path):
with open(groups_file_path, "r") as grps:
contents = yaml.safe_load(grps)

return contents


def get_groups():
# Seed it with the known groups from groups.yaml file.
groups = set()
contents = parse_groups_file()

for group_name in six.iterkeys(contents):
groups.add(group_name)

return groups, contents


def setup(app):
# Seed it with the known groups:
groups = set(('no-op', 'prep', 'pre-introspection',
'pre-deployment', 'post-deployment',
'pre-update', 'pre-upgrade',
'post-upgrade', 'openshift-on-openstack'))
group_name, group_info = get_groups()
build_groups_detail(group_info)

validations = []
for validation_path in sorted(glob('playbooks/*.yaml')):
with open(validation_path) as f:
loaded_validation = yaml.safe_load(f.read())[0]
for group in get_validation_metadata(loaded_validation, 'groups'):
groups.add(group)
group_name.add(group)
validations.append({
'hosts': loaded_validation['hosts'],
'parameters': get_validation_parameters(loaded_validation),
@@ -138,7 +179,7 @@ def setup(app):
'roles': get_include_role(loaded_validation)
})

for group in groups:
for group in group_name:
validations_in_group = [validation for validation
in validations
if group in validation['groups']]

+ 2
- 1
doc/source/index.rst View File

@@ -28,9 +28,10 @@ Existing validations:
validations-pre-deployment-details
validations-post-deployment-details
validations-openshift-on-openstack-details
validations-pre-update-details
validations-pre-upgrade-details
validations-post-upgrade-details
validations-pre-ceph-details
validations-post-ceph-details

Indices and tables
==================

+ 12
- 65
doc/source/readme.rst View File

@@ -43,71 +43,18 @@ the deployment stage they're should be run on.

Validations can belong to multiple groups.

No op
~~~~~

A validation doing nothing for testing the framework

.. include:: validations-no-op.rst

Prep
~~~~

Validations that are run on a fresh machine *before* the undercloud is
installed.

.. include:: validations-prep.rst

Pre Introspection
~~~~~~~~~~~~~~~~~

Validations that are run when the undercloud is ready to perform hardware
introspection.

.. include:: validations-pre-introspection.rst

Pre Deployment
~~~~~~~~~~~~~~

Validations that are run right before deploying the overcloud.

.. include:: validations-pre-deployment.rst

Post Deployment
~~~~~~~~~~~~~~~

Validations that are run after the overcloud deployment finished.

.. include:: validations-post-deployment.rst

Pre Update
~~~~~~~~~~

Validations that are run right before a minor update of the undercloud or overcloud.

.. include:: validations-pre-update.rst

Pre Upgrade
~~~~~~~~~~~

Validations that are run right before a major upgrade of the undercloud or overcloud.

.. include:: validations-pre-upgrade.rst

Post Upgrade
~~~~~~~~~~~~

Validations that are run right after a major upgrade of the undercloud or overcloud.

.. include:: validations-post-upgrade.rst

OpenShift On OpenStack
~~~~~~~~~~~~~~~~~~~~~~

Validations that are run right after the undercloud is installed.

.. include:: validations-openshift-on-openstack.rst

.. include:: validations-groups.rst

To add a new group, you will need to edit the ``groups.yaml`` file located in
the root of the TripleO Validations directory::

$ [vim|emacs] groups.yaml
...
pre-update:
- description: >-
Validations which try to validate your OpenStack deployment before you
update it.
...

Writing Validations
-------------------

doc/source/roles/role-advanced-format-512e-support.rst → doc/source/roles/role-advanced_format_512e_support.rst View File

@@ -1,7 +1,7 @@
============================
advanced-format-512e-support
advanced_format_512e_support
============================

.. ansibleautoplugin::
:role: roles/advanced-format-512e-support
:role: roles/advanced_format_512e_support


doc/source/roles/role-ceilometerdb-size.rst → doc/source/roles/role-ceilometerdb_size.rst View File

@@ -1,7 +1,7 @@
=================
ceilometerdb-size
ceilometerdb_size
=================

.. ansibleautoplugin::
:role: roles/ceilometerdb-size
:role: roles/ceilometerdb_size


doc/source/roles/role-check-latest-packages-version.rst → doc/source/roles/role-check_latest_packages_version.rst View File

@@ -1,6 +1,6 @@
=============================
check-latest-packages-version
check_latest_packages_version
=============================

.. ansibleautoplugin::
:role: roles/check-latest-packages-version
:role: roles/check_latest_packages_version

doc/source/roles/role-undercloud-disk-space.rst → doc/source/roles/role-check_network_gateway.rst View File

@@ -1,7 +1,7 @@
=====================
undercloud-disk-space
check_network_gateway
=====================

.. ansibleautoplugin::
:role: roles/undercloud-disk-space
:role: roles/check_network_gateway


doc/source/roles/role-collect-flavors-and-verify-profiles.rst → doc/source/roles/role-collect_flavors_and_verify_profiles.rst View File

@@ -1,7 +1,7 @@
===================================
collect-flavors-and-verify-profiles
collect_flavors_and_verify_profiles
===================================

.. ansibleautoplugin::
:role: roles/collect-flavors-and-verify-profiles
:role: roles/collect_flavors_and_verify_profiles


doc/source/roles/role-validate-selinux.rst → doc/source/roles/role-container_status.rst View File

@@ -1,6 +1,6 @@
================
validate-selinux
container_status
================

.. ansibleautoplugin::
:role: roles/validate-selinux
:role: roles/container_status

doc/source/roles/role-containerized-undercloud-docker.rst → doc/source/roles/role-containerized_undercloud_docker.rst View File

@@ -1,7 +1,7 @@
===============================
containerized-undercloud-docker
containerized_undercloud_docker
===============================

.. ansibleautoplugin::
:role: roles/containerized-undercloud-docker
:role: roles/containerized_undercloud_docker


doc/source/roles/role-controller-token.rst → doc/source/roles/role-controller_token.rst View File

@@ -1,7 +1,7 @@
================
controller-token
controller_token
================

.. ansibleautoplugin::
:role: roles/controller-token
:role: roles/controller_token


doc/source/roles/role-default-node-count.rst → doc/source/roles/role-controller_ulimits.rst View File

@@ -1,7 +1,7 @@
==================
default-node-count
controller_ulimits
==================

.. ansibleautoplugin::
:role: roles/default-node-count
:role: roles/controller_ulimits


doc/source/roles/role-ctlplane-ip-range.rst → doc/source/roles/role-ctlplane_ip_range.rst View File

@@ -1,7 +1,7 @@
=================
ctlplane-ip-range
ctlplane_ip_range
=================

.. ansibleautoplugin::
:role: roles/ctlplane-ip-range
:role: roles/ctlplane_ip_range


doc/source/roles/role-controller-ulimits.rst → doc/source/roles/role-default_node_count.rst View File

@@ -1,7 +1,7 @@
==================
controller-ulimits
default_node_count
==================

.. ansibleautoplugin::
:role: roles/controller-ulimits
:role: roles/default_node_count


doc/source/roles/role-dhcp-validations.rst → doc/source/roles/role-dhcp_validations.rst View File

@@ -1,7 +1,7 @@
================
dhcp-validations
dhcp_validations
================

.. ansibleautoplugin::
:role: roles/dhcp-validations
:role: roles/dhcp_validations


doc/source/roles/role-healthcheck-service-status.rst → doc/source/roles/role-healthcheck_service_status.rst View File

@@ -1,6 +1,6 @@
==========================
healthcheck-service-status
healthcheck_service_status
==========================

.. ansibleautoplugin::
:role: roles/healthcheck-service-status
:role: roles/healthcheck_service_status

doc/source/roles/role-nova-status.rst → doc/source/roles/role-image_serve.rst View File

@@ -1,7 +1,7 @@
===========
nova-status
image_serve
===========

.. ansibleautoplugin::
:role: roles/nova-status
:role: roles/image_serve


doc/source/roles/role-ironic-boot-configuration.rst → doc/source/roles/role-ironic_boot_configuration.rst View File

@@ -1,7 +1,7 @@
=========================
ironic-boot-configuration
ironic_boot_configuration
=========================

.. ansibleautoplugin::
:role: roles/ironic-boot-configuration
:role: roles/ironic_boot_configuration


doc/source/roles/role-mysql-open-files-limit.rst → doc/source/roles/role-mysql_open_files_limit.rst View File

@@ -1,7 +1,7 @@
======================
mysql-open-files-limit
mysql_open_files_limit
======================

.. ansibleautoplugin::
:role: roles/mysql-open-files-limit
:role: roles/mysql_open_files_limit


doc/source/roles/role-network-environment.rst → doc/source/roles/role-network_environment.rst View File

@@ -1,7 +1,7 @@
===================
network-environment
network_environment
===================

.. ansibleautoplugin::
:role: roles/network-environment
:role: roles/network_environment


doc/source/roles/role-neutron-sanity-check.rst → doc/source/roles/role-neutron_sanity_check.rst View File

@@ -1,7 +1,7 @@
====================
neutron-sanity-check
neutron_sanity_check
====================

.. ansibleautoplugin::
:role: roles/neutron-sanity-check
:role: roles/neutron_sanity_check


doc/source/roles/role-no-op.rst → doc/source/roles/role-no_op.rst View File

@@ -1,7 +1,7 @@
=====
no-op
no_op
=====

.. ansibleautoplugin::
:role: roles/no-op
:role: roles/no_op


doc/source/roles/role-no-op-firewall-nova-driver.rst → doc/source/roles/role-no_op_firewall_nova_driver.rst View File

@@ -3,5 +3,4 @@ no-op-firewall-nova-driver
==========================

.. ansibleautoplugin::
:role: roles/no-op-firewall-nova-driver

:role: roles/no_op_firewall_nova_driver

doc/source/roles/role-node-disks.rst → doc/source/roles/role-node_disks.rst View File

@@ -1,7 +1,7 @@
==========
node-disks
node_disks
==========

.. ansibleautoplugin::
:role: roles/node-disks
:role: roles/node_disks


doc/source/roles/role-node-health.rst → doc/source/roles/role-node_health.rst View File

@@ -1,7 +1,7 @@
===========
node-health
node_health
===========

.. ansibleautoplugin::
:role: roles/node-health
:role: roles/node_health


doc/source/roles/role-nova-event-callback.rst → doc/source/roles/role-nova_event_callback.rst View File

@@ -1,7 +1,7 @@
===================
nova-event-callback
nova_event_callback
===================

.. ansibleautoplugin::
:role: roles/nova-event-callback
:role: roles/nova_event_callback


doc/source/roles/role-image-serve.rst → doc/source/roles/role-nova_status.rst View File

@@ -1,7 +1,7 @@
===========
image-serve
nova_status
===========

.. ansibleautoplugin::
:role: roles/image-serve
:role: roles/nova_status


doc/source/roles/role-openshift-on-openstack.rst → doc/source/roles/role-openshift_on_openstack.rst View File

@@ -1,7 +1,7 @@
======================
openshift-on-openstack
openshift_on_openstack
======================

.. ansibleautoplugin::
:role: roles/openshift-on-openstack
:role: roles/openshift_on_openstack


doc/source/roles/role-openstack-endpoints.rst → doc/source/roles/role-openstack_endpoints.rst View File

@@ -1,7 +1,7 @@
===================
openstack-endpoints
openstack_endpoints
===================

.. ansibleautoplugin::
:role: roles/openstack-endpoints
:role: roles/openstack_endpoints


doc/source/roles/role-ovs-dpdk-pmd.rst → doc/source/roles/role-ovs_dpdk_pmd.rst View File

@@ -1,7 +1,7 @@
============
ovs-dpdk-pmd
ovs_dpdk_pmd
============

.. ansibleautoplugin::
:role: roles/ovs-dpdk-pmd
:role: roles/ovs_dpdk_pmd


doc/source/roles/role-undercloud-debug.rst → doc/source/roles/role-pacemaker_status.rst View File

@@ -1,7 +1,7 @@
================
undercloud-debug
pacemaker_status
================

.. ansibleautoplugin::
:role: roles/undercloud-debug
:role: roles/pacemaker_status


doc/source/roles/role-rabbitmq-limits.rst → doc/source/roles/role-rabbitmq_limits.rst View File

@@ -1,7 +1,7 @@
===============
rabbitmq-limits
rabbitmq_limits
===============

.. ansibleautoplugin::
:role: roles/rabbitmq-limits
:role: roles/rabbitmq_limits


doc/source/roles/role-service-status.rst → doc/source/roles/role-service_status.rst View File

@@ -1,7 +1,7 @@
==============
service-status
service_status
==============

.. ansibleautoplugin::
:role: roles/service-status
:role: roles/service_status


doc/source/roles/role-stack-health.rst → doc/source/roles/role-stack_health.rst View File

@@ -1,7 +1,7 @@
============
stack-health
stack_health
============

.. ansibleautoplugin::
:role: roles/stack-health
:role: roles/stack_health


doc/source/roles/role-stonith-exists.rst → doc/source/roles/role-stonith_exists.rst View File

@@ -1,7 +1,7 @@
==============
stonith-exists
stonith_exists
==============

.. ansibleautoplugin::
:role: roles/stonith-exists
:role: roles/stonith_exists


doc/source/roles/role-switch-vlans.rst → doc/source/roles/role-switch_vlans.rst View File

@@ -1,7 +1,7 @@
============
switch-vlans
switch_vlans
============

.. ansibleautoplugin::
:role: roles/switch-vlans
:role: roles/switch_vlans


doc/source/roles/role-tls-everywhere.rst → doc/source/roles/role-tls_everywhere.rst View File

@@ -1,7 +1,7 @@
==============
tls-everywhere
tls_everywhere
==============

.. ansibleautoplugin::
:role: roles/tls-everywhere
:role: roles/tls_everywhere


+ 0
- 7
doc/source/roles/role-undercloud-ram.rst View File

@@ -1,7 +0,0 @@
==============
undercloud-ram
==============

.. ansibleautoplugin::
:role: roles/undercloud-ram


doc/source/roles/role-undercloud-cpu.rst → doc/source/roles/role-undercloud_cpu.rst View File

@@ -1,7 +1,7 @@
==============
undercloud-cpu
undercloud_cpu
==============

.. ansibleautoplugin::
:role: roles/undercloud-cpu
:role: roles/undercloud_cpu


doc/source/roles/role-pacemaker-status.rst → doc/source/roles/role-undercloud_debug.rst View File

@@ -1,7 +1,7 @@
================
pacemaker-status
undercloud_debug
================

.. ansibleautoplugin::
:role: roles/pacemaker-status
:role: roles/undercloud_debug


doc/source/roles/role-undercloud-tokenflush.rst → doc/source/roles/role-undercloud_disk_space.rst View File

@@ -1,7 +1,7 @@
=====================
undercloud-tokenflush
undercloud_disk_space
=====================

.. ansibleautoplugin::
:role: roles/undercloud-tokenflush
:role: roles/undercloud_disk_space


doc/source/roles/role-undercloud-heat-purge-deleted.rst → doc/source/roles/role-undercloud_heat_purge_deleted.rst View File

@@ -1,7 +1,7 @@
=============================
undercloud-heat-purge-deleted
undercloud_heat_purge_deleted
=============================

.. ansibleautoplugin::
:role: roles/undercloud-heat-purge-deleted
:role: roles/undercloud_heat_purge_deleted


doc/source/roles/role-undercloud-process-count.rst → doc/source/roles/role-undercloud_process_count.rst View File

@@ -1,7 +1,7 @@
========================
undercloud-process-count
undercloud_process_count
========================

.. ansibleautoplugin::
:role: roles/undercloud-process-count
:role: roles/undercloud_process_count


+ 7
- 0
doc/source/roles/role-undercloud_ram.rst View File

@@ -0,0 +1,7 @@
==============
undercloud_ram
==============

.. ansibleautoplugin::
:role: roles/undercloud_ram


doc/source/roles/role-undercloud-selinux-mode.rst → doc/source/roles/role-undercloud_selinux_mode.rst View File

@@ -1,7 +1,7 @@
=======================
undercloud-selinux-mode
undercloud_selinux_mode
=======================

.. ansibleautoplugin::
:role: roles/undercloud-selinux-mode
:role: roles/undercloud_selinux_mode


doc/source/roles/role-undercloud-service-status.rst → doc/source/roles/role-undercloud_service_status.rst View File

@@ -1,7 +1,7 @@
=========================
undercloud-service-status
undercloud_service_status
=========================

.. ansibleautoplugin::
:role: roles/undercloud-service-status
:role: roles/undercloud_service_status


doc/source/roles/role-check-network-gateway.rst → doc/source/roles/role-undercloud_tokenflush.rst View File

@@ -1,7 +1,6 @@
=====================
check-network-gateway
undercloud_tokenflush
=====================

.. ansibleautoplugin::
:role: roles/check-network-gateway

:role: roles/undercloud_tokenflush

doc/source/roles/role-container-status.rst → doc/source/roles/role-validate_selinux.rst View File

@@ -1,6 +1,6 @@
================
container-status
validate_selinux
================

.. ansibleautoplugin::
:role: roles/container-status
:role: roles/validate_selinux

doc/source/roles/role-xfs-check-ftype.rst → doc/source/roles/role-xfs_check_ftype.rst View File

@@ -1,8 +1,8 @@
===============
xfs-check-ftype
xfs_check_ftype
===============

.. ansibleautoplugin::
:role: roles/xfs-check-ftype
:role: roles/xfs_check_ftype



+ 0
- 1
tox.ini View File

@@ -5,7 +5,6 @@ skipdist = True

[testenv]
usedevelop = True
basepython = python3
passenv = *
setenv =
ANSIBLE_CALLBACK_PLUGINS={toxinidir}/callback_plugins

Loading…
Cancel
Save