Fixed tox executions

- fixed bindep to allow execution under fedora
- fixed flake8 config to use officially recommended use patterns
- assured that git does not report dirty after running tox (both
  pep8 and tht environments where breaking this by creating untracked
  files). tox-extra plugin addition will prevent future regressions.

Change-Id: I4137056853f8c5f1c2304bfb6ec1188a82b12130
Bug: #1921409
This commit is contained in:
Sorin Sbarnea 2021-03-25 13:41:01 +00:00
parent ab7a7d841f
commit 2108a5191b
3 changed files with 127 additions and 8 deletions

112
.gitignore vendored
View File

@ -52,18 +52,130 @@ doc/_build
AUTHORS
ChangeLog
# Leftovers from other commants like tox -e pep8,tht
.cache
common/deploy-steps-tasks-step-0.yaml
common/post.yaml
common/services/blockstorage-role.yaml
common/services/cephstorage-role.yaml
common/services/compute-role.yaml
common/services/controller-role.yaml
common/services/objectstorage-role.yaml
deployment/apache/apache-baremetal-puppet.yaml
deployment/container-image-prepare/container-image-prepare-baremetal-ansible.yaml
deployment/haproxy/haproxy-internal-tls-certmonger.yaml
deployment/octavia/octavia-deployment-config.yaml
environments/deployed-server-environment.yaml
environments/net-2-linux-bonds-with-vlans.yaml
environments/net-bond-with-vlans-no-external.yaml
environments/net-bond-with-vlans.yaml
environments/net-dpdkbond-with-vlans.yaml
environments/net-multiple-nics-vlans.yaml
environments/net-multiple-nics.yaml
environments/net-noop.yaml
environments/net-single-nic-linux-bridge-with-vlans.yaml
environments/net-single-nic-with-vlans-no-external.yaml
environments/net-single-nic-with-vlans.yaml
environments/network-environment-v6-all.yaml
environments/network-environment-v6.yaml
environments/network-environment.yaml
environments/network-isolation-no-tunneling.yaml
environments/network-isolation-v6-all.yaml
environments/network-isolation-v6.yaml
environments/network-isolation.yaml
environments/networks-disable.yaml
environments/overcloud-baremetal.yaml
environments/split-stack-consistent-hostname-format.yaml
environments/ssl/enable-internal-tls.yaml
extraconfig/all_nodes/swap-partition.yaml
extraconfig/all_nodes/swap.yaml
extraconfig/nova_metadata/krb-service-principals/blockstorage-role.yaml
extraconfig/nova_metadata/krb-service-principals/cephstorage-role.yaml
extraconfig/nova_metadata/krb-service-principals/compute-role.yaml
extraconfig/nova_metadata/krb-service-principals/controller-role.yaml
extraconfig/nova_metadata/krb-service-principals/objectstorage-role.yaml
extraconfig/tasks/major_upgrade_pacemaker_init.yaml
network/external.yaml
network/external_v6.yaml
network/internal_api.yaml
network/internal_api_v6.yaml
network/management.yaml
network/management_v6.yaml
network/networks.yaml
network/ports/deployed_external.yaml
network/ports/deployed_internal_api.yaml
network/ports/deployed_management.yaml
network/ports/deployed_storage.yaml
network/ports/deployed_storage_mgmt.yaml
network/ports/deployed_tenant.yaml
network/ports/deployed_vip_external.yaml
network/ports/deployed_vip_internal_api.yaml
network/ports/deployed_vip_management.yaml
network/ports/deployed_vip_storage.yaml
network/ports/deployed_vip_storage_mgmt.yaml
network/ports/deployed_vip_tenant.yaml
network/ports/external.yaml
network/ports/external_from_pool.yaml
network/ports/external_from_pool_v6.yaml
network/ports/external_resource_external.yaml
network/ports/external_resource_external_v6.yaml
network/ports/external_resource_internal_api.yaml
network/ports/external_resource_internal_api_v6.yaml
network/ports/external_resource_management.yaml
network/ports/external_resource_management_v6.yaml
network/ports/external_resource_storage.yaml
network/ports/external_resource_storage_mgmt.yaml
network/ports/external_resource_storage_mgmt_v6.yaml
network/ports/external_resource_storage_v6.yaml
network/ports/external_resource_tenant.yaml
network/ports/external_resource_tenant_v6.yaml
network/ports/external_v6.yaml
network/ports/internal_api.yaml
network/ports/internal_api_from_pool.yaml
network/ports/internal_api_from_pool_v6.yaml
network/ports/internal_api_v6.yaml
network/ports/management.yaml
network/ports/management_from_pool.yaml
network/ports/management_from_pool_v6.yaml
network/ports/management_v6.yaml
network/ports/net_ip_list_map.yaml
network/ports/net_ip_map.yaml
network/ports/net_vip_map_external.yaml
network/ports/net_vip_map_external_v6.yaml
network/ports/storage.yaml
network/ports/storage_from_pool.yaml
network/ports/storage_from_pool_v6.yaml
network/ports/storage_mgmt.yaml
network/ports/storage_mgmt_from_pool.yaml
network/ports/storage_mgmt_from_pool_v6.yaml
network/ports/storage_mgmt_v6.yaml
network/ports/storage_v6.yaml
network/ports/tenant.yaml
network/ports/tenant_from_pool.yaml
network/ports/tenant_from_pool_v6.yaml
network/ports/tenant_v6.yaml
network/service_net_map.yaml
network/storage.yaml
network/storage_mgmt.yaml
network/storage_mgmt_v6.yaml
network/storage_v6.yaml
network/tenant.yaml
network/tenant_v6.yaml
overcloud-resource-registry-puppet.yaml
overcloud.yaml
puppet/blockstorage-config.yaml
puppet/blockstorage-role.yaml
puppet/cephstorage-config.yaml
puppet/cephstorage-role.yaml
puppet/compute-config.yaml
puppet/compute-role.yaml
puppet/controller-config.yaml
puppet/controller-role.yaml
puppet/objectstorage-config.yaml
puppet/objectstorage-role.yaml
puppet/post.yaml
tripleo_heat_templates/tests/ansible-pacemaker
tripleo_heat_templates/tests/tripleo-ansible
# Files created by releasenotes build
releasenotes/build

View File

@ -3,10 +3,14 @@
libssl-dev [platform:dpkg]
openssl-devel [platform:rpm]
gcc [platform:rpm]
python36-devel [platform:rpm]
python36-devel [platform:rhel8 platform:centos-8]
python3-devel [platform:rpm !platform:rhel8 !platform:centos-8]
# For SELinux
libselinux-python [platform:rpm !platform:rhel-8 !platform:centos-8]
libsemanage-python [platform:redhat !platform:rhel-8 !platform:centos-8]
libselinux-python3 [platform:rpm !platform:rhel-7 !platform:centos-7]
libsemanage-python3 [platform:redhat !platform:rhel-7 !platform:centos-7]
libselinux-python [platform:rpm !platform:rhel-8 !platform:centos-8 !platform:fedora]
libsemanage-python [platform:redhat !platform:rhel-8 !platform:centos-8 !platform:fedora]
libselinux-python3 [platform:rpm !platform:rhel-7 !platform:centos-7 !platform:fedora]
libsemanage-python3 [platform:redhat !platform:rhel-7 !platform:centos-7 !platform:fedora]
python3-libselinux [platform:rpm platform:fedora]
python3-libsemanage [platform:rpm platform:fedora]

View File

@ -2,6 +2,9 @@
minversion = 2.0
skipsdist = True
envlist = pep8,py,tht
requires =
# extra plugin returns error if git reports untracked or dirty files
tox-extra>=0.0.0
[testenv]
basepython = python3
@ -24,9 +27,9 @@ commands =
python ./tools/yaml-validate.py .
bash -c ./tools/roles-data-validation.sh
bash -c ./tools/check-up-to-date.sh
flake8 --exclude releasenotes,.tox,__pycache__ --ignore {[testenv:flake8]ignore}
flake8
[testenv:flake8]
[flake8]
# E125 is deliberately excluded. See
# https://github.com/jcrocholl/pep8/issues/126. It's just wrong.
#
@ -51,7 +54,7 @@ commands =
# E731 do not assign a lambda expression, use a def
# W605 invalid escape sequence
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405,W503,W504,E501,E731,W605
exclude = releasenotes
exclude = releasenotes,.cache,.tox,__pycache__,tripleo_heat_templates/tests/tripleo-ansible,tripleo_heat_templates/tests/ansible-pacemaker
[testenv:templates]
commands = python ./tools/process-templates.py