Merge "Optimize linters executions from tox and pre-commit" into stable/train

This commit is contained in:
Zuul 2022-01-14 19:17:24 +00:00 committed by Gerrit Code Review
commit 9bd40474de
62 changed files with 5 additions and 106 deletions

View File

@ -12,8 +12,6 @@ repos:
- id: debug-statements - id: debug-statements
- id: flake8 - id: flake8
entry: flake8 --ignore=E24,E121,E122,E123,E124,E126,E226,E265,E305,E402,F401,F405,E501,E704,F403,F841,W503,W605 entry: flake8 --ignore=E24,E121,E122,E123,E124,E126,E226,E265,E305,E402,F401,F405,E501,E704,F403,F841,W503,W605
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/adrienverge/yamllint.git - repo: https://github.com/adrienverge/yamllint.git
rev: v1.15.0 rev: v1.15.0
hooks: hooks:

View File

@ -173,4 +173,3 @@
defend, and hold each Contributor harmless for any liability defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability. of your accepting any such warranty or additional liability.

View File

@ -1,2 +1 @@
[python: **.py] [python: **.py]

View File

@ -7,4 +7,3 @@ Contents:
:glob: :glob:
modules/* modules/*

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/ceph_pools_pg_protection.py :module: library/ceph_pools_pg_protection.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/check_cpus_aligned_with_dpdk_nics.py :module: library/check_cpus_aligned_with_dpdk_nics.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/check_flavors.py :module: library/check_flavors.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/check_ironic_boot_config.py :module: library/check_ironic_boot_config.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/check_other_processes_pmd_usage.py :module: library/check_other_processes_pmd_usage.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/convert_range_to_numbers_list.py :module: library/convert_range_to_numbers_list.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/docker_facts.py :module: library/docker_facts.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/get_dpdk_nics_numa_info.py :module: library/get_dpdk_nics_numa_info.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/icmp_ping.py :module: library/icmp_ping.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/ip_range.py :module: library/ip_range.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/network_environment.py :module: library/network_environment.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/node_disks.py :module: library/node_disks.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/overcloudrc.py :module: library/overcloudrc.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/ovs_dpdk_pmd_cpus_check.py :module: library/ovs_dpdk_pmd_cpus_check.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/pacemaker.py :module: library/pacemaker.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/pmd_threads_siblings_check.py :module: library/pmd_threads_siblings_check.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/switch_vlans.py :module: library/switch_vlans.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -12,4 +12,3 @@ This module provides for the following ansible plugin:
:module: library/verify_profiles.py :module: library/verify_profiles.py
:documentation: true :documentation: true
:examples: true :examples: true

View File

@ -7,4 +7,3 @@ Contents:
:glob: :glob:
roles/* roles/*

View File

@ -4,4 +4,3 @@ ceilometerdb_size
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/ceilometerdb_size :role: roles/ceilometerdb_size

View File

@ -4,4 +4,3 @@ ceph
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/ceph :role: roles/ceph

View File

@ -4,4 +4,3 @@ check_network_gateway
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/check_network_gateway :role: roles/check_network_gateway

View File

@ -4,4 +4,3 @@ collect_flavors_and_verify_profiles
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/collect_flavors_and_verify_profiles :role: roles/collect_flavors_and_verify_profiles

View File

@ -6,4 +6,3 @@ compute_tsx
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/compute_tsx :role: roles/compute_tsx

View File

@ -4,4 +4,3 @@ containerized_undercloud_docker
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/containerized_undercloud_docker :role: roles/containerized_undercloud_docker

View File

@ -4,4 +4,3 @@ controller_token
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/controller_token :role: roles/controller_token

View File

@ -4,4 +4,3 @@ controller_ulimits
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/controller_ulimits :role: roles/controller_ulimits

View File

@ -4,4 +4,3 @@ ctlplane_ip_range
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/ctlplane_ip_range :role: roles/ctlplane_ip_range

View File

@ -4,4 +4,3 @@ default_node_count
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/default_node_count :role: roles/default_node_count

View File

@ -4,4 +4,3 @@ dhcp_validations
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/dhcp_validations :role: roles/dhcp_validations

View File

@ -4,4 +4,3 @@ image_serve
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/image_serve :role: roles/image_serve

View File

@ -4,4 +4,3 @@ ironic_boot_configuration
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/ironic_boot_configuration :role: roles/ironic_boot_configuration

View File

@ -4,4 +4,3 @@ mysql_open_files_limit
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/mysql_open_files_limit :role: roles/mysql_open_files_limit

View File

@ -4,4 +4,3 @@ network_environment
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/network_environment :role: roles/network_environment

View File

@ -4,4 +4,3 @@ neutron_sanity_check
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/neutron_sanity_check :role: roles/neutron_sanity_check

View File

@ -4,4 +4,3 @@ node_disks
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/node_disks :role: roles/node_disks

View File

@ -4,4 +4,3 @@ node_health
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/node_health :role: roles/node_health

View File

@ -46,4 +46,3 @@ Full Description
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/nova_event_callback :role: roles/nova_event_callback

View File

@ -4,4 +4,3 @@ nova_status
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/nova_status :role: roles/nova_status

View File

@ -4,4 +4,3 @@ openshift_on_openstack
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/openshift_on_openstack :role: roles/openshift_on_openstack

View File

@ -4,4 +4,3 @@ openstack_endpoints
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/openstack_endpoints :role: roles/openstack_endpoints

View File

@ -4,4 +4,3 @@ overcloud_service_status
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/overcloud_service_status :role: roles/overcloud_service_status

View File

@ -4,4 +4,3 @@ ovs_dpdk_pmd
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/ovs_dpdk_pmd :role: roles/ovs_dpdk_pmd

View File

@ -4,4 +4,3 @@ pacemaker_status
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/pacemaker_status :role: roles/pacemaker_status

View File

@ -4,4 +4,3 @@ rabbitmq_limits
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/rabbitmq_limits :role: roles/rabbitmq_limits

View File

@ -4,4 +4,3 @@ repos
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/repos :role: roles/repos

View File

@ -4,4 +4,3 @@ stack_health
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/stack_health :role: roles/stack_health

View File

@ -4,4 +4,3 @@ stonith_exists
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/stonith_exists :role: roles/stonith_exists

View File

@ -4,4 +4,3 @@ switch_vlans
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/switch_vlans :role: roles/switch_vlans

View File

@ -4,4 +4,3 @@ tls_everywhere
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/tls_everywhere :role: roles/tls_everywhere

View File

@ -4,4 +4,3 @@ undercloud_debug
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/undercloud_debug :role: roles/undercloud_debug

View File

@ -4,4 +4,3 @@ undercloud_disk_space
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/undercloud_disk_space :role: roles/undercloud_disk_space

View File

@ -4,4 +4,3 @@ undercloud_heat_purge_deleted
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/undercloud_heat_purge_deleted :role: roles/undercloud_heat_purge_deleted

View File

@ -4,4 +4,3 @@ undercloud_process_count
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/undercloud_process_count :role: roles/undercloud_process_count

View File

@ -4,4 +4,3 @@ undercloud_service_status
.. ansibleautoplugin:: .. ansibleautoplugin::
:role: roles/undercloud_service_status :role: roles/undercloud_service_status

View File

@ -2,4 +2,4 @@
features: features:
- | - |
Adds a ceph-health check which prints a warning message if Ceph cluster Adds a ceph-health check which prints a warning message if Ceph cluster
is in HEALTH_WARN state at the end of the Overcloud deployment is in HEALTH_WARN state at the end of the Overcloud deployment

View File

@ -1 +1 @@
test ansible_connection=local ansible_host=localhost test ansible_connection=local ansible_host=localhost

47
tox.ini
View File

@ -28,7 +28,8 @@ deps =
-r {toxinidir}/requirements.txt -r {toxinidir}/requirements.txt
-r {toxinidir}/test-requirements.txt -r {toxinidir}/test-requirements.txt
-r {toxinidir}/molecule-requirements.txt -r {toxinidir}/molecule-requirements.txt
whitelist_externals = bash whitelist_externals =
bash
[testenv:bindep] [testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if # Do not install any requirements. We want this to be fast and work even if
@ -41,44 +42,6 @@ commands = bindep test
[testenv:debug] [testenv:debug]
commands = oslo_debug_helper {posargs} commands = oslo_debug_helper {posargs}
[testenv:pep8]
envdir = {toxworkdir}/linters
commands =
python -m pre_commit run flake8 -a
[testenv:ansible-lint]
envdir = {toxworkdir}/linters
deps =
{[testenv:linters]deps}
commands =
bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/roles'"
bash -c "ANSIBLE_LIBRARY='{toxinidir}/library'"
python -m pre_commit run ansible-lint -a
[testenv:yamllint]
envdir = {toxworkdir}/linters
deps = {[testenv:linters]deps}
commands =
python -m pre_commit run yamllint -a
[testenv:bashate]
envdir = {toxworkdir}/linters
deps = {[testenv:linters]deps}
commands =
python -m pre_commit run bashate -a
[testenv:whitespace]
envdir = {toxworkdir}/linters
deps = {[testenv:linters]deps}
commands =
python -m pre_commit run trailing-whitespace -a
[testenv:shebangs]
envdir = {toxworkdir}/linters
deps = {[testenv:linters]deps}
commands =
python -m pre_commit run check-executables-have-shebangs -a
[testenv:linters] [testenv:linters]
deps = deps =
-r {toxinidir}/requirements.txt -r {toxinidir}/requirements.txt
@ -86,11 +49,7 @@ deps =
-r {toxinidir}/molecule-requirements.txt -r {toxinidir}/molecule-requirements.txt
commands = commands =
python '{toxinidir}/tools/validate-files.py' . python '{toxinidir}/tools/validate-files.py' .
{[testenv:ansible-lint]commands} python -m pre_commit run -a
{[testenv:yamllint]commands}
{[testenv:bashate]commands}
{[testenv:whitespace]commands}
{[testenv:shebangs]commands}
[testenv:releasenotes] [testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt