From e55aaabade2e1cd2b0eaaaacffb595d58ee63604 Mon Sep 17 00:00:00 2001 From: Mathieu Bultel Date: Tue, 1 Sep 2020 21:57:43 +0200 Subject: [PATCH] Update tripleo-validations path to /usr/share/ansible According to: https://review.rdoproject.org/r/#/c/29059/ We decide to converge ansible roles/libraries/plugin and playbooks to the /usr/share/ansible path instead of having a dedicated path for validations. This will avoid duplication since the validation-framework is now an external framework from tripleo, the common validations between validations-common and tripleo-validations can be stored at the same place. Add a fallback path for Updates and Upgrades Change-Id: Ibe97d70f4d321d04900ca9fe88144bc16511611c (cherry picked from commit df0cecfe55b9ce87d4ad5cf49e94298051ee3890) --- tripleoclient/constants.py | 14 +++++++++++--- .../tests/v1/tripleo/test_tripleo_validator.py | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tripleoclient/constants.py b/tripleoclient/constants.py index 4b97968d3..dcba78d76 100644 --- a/tripleoclient/constants.py +++ b/tripleoclient/constants.py @@ -91,7 +91,10 @@ ENABLE_SSH_ADMIN_SSH_PORT_TIMEOUT = 600 ADDITIONAL_ARCHITECTURES = ['ppc64le'] -DEFAULT_VALIDATIONS_BASEDIR = '/usr/share/openstack-tripleo-validations' +DEFAULT_VALIDATIONS_BASEDIR = ( + "/usr/share/ansible" + if os.path.exists("/usr/share/ansible/validation-playbooks") + else "/usr/share/openstack-tripleo-validations") VALIDATIONS_LOG_BASEDIR = '/var/log/validations' @@ -100,8 +103,13 @@ DEFAULT_WORK_DIR = '/var/lib/mistral' ANSIBLE_INVENTORY = \ '/var/lib/mistral/overcloud/tripleo-ansible-inventory.yaml' -ANSIBLE_VALIDATION_DIR = \ - '/usr/share/openstack-tripleo-validations/playbooks' +ANSIBLE_VALIDATION_DIR = ( + "/usr/share/ansible/validation-playbooks" + if os.path.exists("/usr/share/ansible/validation-playbooks") + else "/usr/share/openstack-tripleo-validations/playbooks") + +ANSIBLE_TRIPLEO_PLAYBOOKS = \ + '/usr/share/ansible/tripleo-playbooks' VALIDATION_GROUPS_INFO = '%s/groups.yaml' % DEFAULT_VALIDATIONS_BASEDIR diff --git a/tripleoclient/tests/v1/tripleo/test_tripleo_validator.py b/tripleoclient/tests/v1/tripleo/test_tripleo_validator.py index 69e09014f..5c73f1869 100644 --- a/tripleoclient/tests/v1/tripleo/test_tripleo_validator.py +++ b/tripleoclient/tests/v1/tripleo/test_tripleo_validator.py @@ -50,7 +50,7 @@ VALIDATIONS_LOGS_CONTENTS_LIST = [{ 'id': '008886df-d297-1eaa-2a74-000000000008', 'validation_id': '512e', 'validation_path': - '/usr/share/openstack-tripleo-validations/playbooks' + '/usr/share/ansible/validation-playbooks' }, 'tasks': [ {