From b8266ef40261fe034817d711440f0337b040c38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Douglas=20Mendiz=C3=A1bal?= Date: Thu, 23 Jan 2020 11:56:33 -0600 Subject: [PATCH] Use Zuulv3 devstack jobs This patch updates the gate jobs to stop using legacy jobs and use the new Zuul v3 jobs instead. The tempest tests will be re-enabled in a future patch. Depends-On: I5d2bda5e653ee5d7c17cb7697247802916bdc5f7 Change-Id: Id91f44e8053cf4f40224959021d43736d5525107 --- .zuul.yaml | 162 ++++++------------ devstack/settings | 2 + doc/source/contributor/plugin/crypto.rst | 2 +- .../api/v1/functional/test_acls.py | 2 +- .../api/v1/functional/test_consumers.py | 2 +- .../api/v1/functional/test_containers.py | 4 +- .../api/v1/functional/test_secrets.py | 4 +- .../api/v1/smoke/test_consumers.py | 2 +- .../api/v1/smoke/test_containers.py | 2 +- functionaltests/api/v1/smoke/test_secrets.py | 4 +- tox.ini | 1 + 11 files changed, 65 insertions(+), 122 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index eddc12ee9..cba1f6a9a 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,33 +1,46 @@ +--- - job: - name: barbican-devstack-functional-base - parent: legacy-dsvm-base - vars: - database: sql - services: tempest,rabbit,mysql,key + name: barbican-tox-functional + parent: devstack-tox-functional + description: Functional testing required-projects: - - openstack/devstack-gate - - openstack/barbican - - openstack/barbican-tempest-plugin - - openstack/python-barbicanclient - run: playbooks/legacy/barbican-devstack-functional-base/run.yaml - post-run: playbooks/legacy/barbican-devstack-functional-base/post.yaml - timeout: 4200 + - name: openstack/barbican + - name: openstack/castellan + - name: openstack/openstacksdk + vars: + devstack_localrc: + USE_PYTHON3: true + devstack_plugins: + barbican: https://opendev.org/openstack/barbican + tox_install_siblings: true - job: - name: barbican-devstack-base - parent: legacy-base + name: barbican-dogtag-tox-functional + nodeset: devstack-single-node-fedora-latest + parent: barbican-tox-functional + description: | + Functional testing for DogTag backend vars: - database: sql - services: tempest,keystone - required-projects: - - openstack/devstack - - openstack/devstack-gate - - openstack/barbican - - openstack/barbican-tempest-plugin - - openstack/python-barbicanclient - run: playbooks/legacy/barbican-devstack-base/run.yaml - post-run: playbooks/legacy/barbican-devstack-base/post.yaml - timeout: 4200 + devstack_services: + dogtag: true + +- job: + name: barbican-vault-tox-functional + parent: barbican-tox-functional + description: | + Functional testing for Hashicorp Vault backend + vars: + devstack_services: + vault: true + +- job: + name: barbican-kmip-tox-functional + parent: devstack-tox-functional + description: | + Functional testing for KMIP backend using PyKMIP + vars: + devstack_services: + kmip: true - job: name: barbican-devstack-tempest-base @@ -48,67 +61,6 @@ post-run: playbooks/legacy/barbican-devstack-tempest-base/post.yaml timeout: 4200 -- job: - name: barbican-dogtag-devstack-functional-fedora-latest - nodeset: devstack-single-node-fedora-latest - parent: barbican-devstack-functional-base - # non-voting until https://pagure.io/dogtagpki/issue/3108 is fixed - voting: false - vars: - services: barbican-dogtag,tempest,rabbit,mysql,key - plugin: dogtag - post-run: playbooks/legacy/barbican-devstack-functional-base/dogtag-post.yaml - -- job: - name: barbican-vault-devstack-functional - parent: barbican-devstack-functional-base - vars: - services: barbican-vault,tempest,rabbit,mysql,key - plugin: vault - -- job: - name: barbican-kmip-devstack-functional - parent: barbican-devstack-functional-base - vars: - services: barbican-pykmip,pykmip-server,tempest,rabbit,mysql,key - plugin: kmip - -- job: - name: barbican-simple-crypto-devstack-functional - parent: barbican-devstack-functional-base - vars: - plugin: simple-crypto - -- job: - name: barbican-simple-crypto-devstack-functional-postgres - parent: barbican-devstack-functional-base - voting: false - vars: - database: postgres - plugin: simple-crypto - -- job: - name: barbican-dogtag-devstack-fedora-latest - nodeset: devstack-single-node-fedora-latest - parent: barbican-devstack-base - vars: - services: barbican-dogtag,tempest,keystone - plugin: dogtag - -- job: - name: barbican-simple-crypto-devstack - parent: barbican-devstack-base - vars: - plugin: simple-crypto - -- job: - name: barbican-simple-crypto-devstack-postgres - parent: barbican-devstack-base - voting: false - vars: - plugin: simple-crypto - database: postgres - - job: name: barbican-simple-crypto-devstack-tempest parent: barbican-devstack-tempest-base @@ -131,20 +83,13 @@ cursive: 1 - job: - name: barbican-grenade-devstack - parent: legacy-dsvm-base - irrelevant-files: - - ^(test-|)requirements.txt$ - - ^setup.cfg$ - run: playbooks/legacy/grenade-devstack-barbican/run.yaml - post-run: playbooks/legacy/grenade-devstack-barbican/post.yaml + name: barbican-grenade + parent: grenade-py3 required-projects: - openstack/grenade - - openstack/devstack-gate - openstack/barbican - openstack/barbican-tempest-plugin - openstack/python-barbicanclient - timeout: 7800 - project: templates: @@ -156,13 +101,15 @@ - release-notes-jobs-python3 check: jobs: - - barbican-simple-crypto-devstack-tempest - - barbican-simple-crypto-devstack-functional - - barbican-simple-crypto-devstack-functional-postgres - - barbican-dogtag-devstack-functional-fedora-latest - - barbican-vault-devstack-functional - - barbican-grenade-devstack - - barbican-simple-crypto-devstack-tempest-ipv6-only + - barbican-tox-functional + - barbican-dogtag-tox-functional: + voting: false + - barbican-vault-tox-functional: + voting: false + - barbican-grenade: + voting: false + # - barbican-simple-crypto-devstack-tempest + # - barbican-simple-crypto-devstack-tempest-ipv6-only - octavia-v2-dsvm-tls-barbican # TripleO jobs that deploy Barbican. # Note we don't use a project-template here, so it's easier @@ -176,15 +123,8 @@ gate: queue: barbican jobs: - - barbican-simple-crypto-devstack-tempest - - barbican-simple-crypto-devstack-functional - # TODO(redrobot): add this back once job is voting again - #- barbican-dogtag-devstack-functional-fedora-latest - - barbican-vault-devstack-functional - - barbican-grenade-devstack - - barbican-simple-crypto-devstack-tempest-ipv6-only - - octavia-v2-dsvm-tls-barbican + - barbican-tox-functional experimental: jobs: - - barbican-kmip-devstack-functional + - barbican-kmip-tox-functional diff --git a/devstack/settings b/devstack/settings index b881d4463..c3f8ac0f3 100644 --- a/devstack/settings +++ b/devstack/settings @@ -1,6 +1,8 @@ # Defaults # -------- +define_plugin barbican + # Set up default directories BARBICAN_DIR=$DEST/barbican BARBICAN_CONF_DIR=${BARBICAN_CONF_DIR:-/etc/barbican} diff --git a/doc/source/contributor/plugin/crypto.rst b/doc/source/contributor/plugin/crypto.rst index fb070a59e..ec06b20e2 100644 --- a/doc/source/contributor/plugin/crypto.rst +++ b/doc/source/contributor/plugin/crypto.rst @@ -43,7 +43,7 @@ data models. .. autoclass:: GenerateDTO -.. autoclass:: GenerateDTO +.. autoclass:: ResponseDTO Plugin Base Class ================= diff --git a/functionaltests/api/v1/functional/test_acls.py b/functionaltests/api/v1/functional/test_acls.py index 778e702b0..db19ca268 100644 --- a/functionaltests/api/v1/functional/test_acls.py +++ b/functionaltests/api/v1/functional/test_acls.py @@ -334,7 +334,7 @@ class AclTestCase(base.TestCase): secret_no_payload = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", diff --git a/functionaltests/api/v1/functional/test_consumers.py b/functionaltests/api/v1/functional/test_consumers.py index 37594372c..6883e3d47 100644 --- a/functionaltests/api/v1/functional/test_consumers.py +++ b/functionaltests/api/v1/functional/test_consumers.py @@ -26,7 +26,7 @@ from functionaltests.api.v1.models import secret_models create_secret_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", diff --git a/functionaltests/api/v1/functional/test_containers.py b/functionaltests/api/v1/functional/test_containers.py index 0e7cf159b..26ceec544 100644 --- a/functionaltests/api/v1/functional/test_containers.py +++ b/functionaltests/api/v1/functional/test_containers.py @@ -109,7 +109,7 @@ class BaseContainerTestCase(base.TestCase): def _create_a_secret(self): secret_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", @@ -389,7 +389,7 @@ class ContainersPagingTestCase(base.PagingTestCase): def _create_a_secret(self): secret_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", diff --git a/functionaltests/api/v1/functional/test_secrets.py b/functionaltests/api/v1/functional/test_secrets.py index d3cc77531..afc2cbe04 100644 --- a/functionaltests/api/v1/functional/test_secrets.py +++ b/functionaltests/api/v1/functional/test_secrets.py @@ -84,7 +84,7 @@ def get_passphrase_req(): def get_default_data(): return { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", @@ -135,7 +135,7 @@ class SecretsTestCase(base.TestCase): self.default_secret_create_two_phase_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", diff --git a/functionaltests/api/v1/smoke/test_consumers.py b/functionaltests/api/v1/smoke/test_consumers.py index f662ad033..b2fb62915 100644 --- a/functionaltests/api/v1/smoke/test_consumers.py +++ b/functionaltests/api/v1/smoke/test_consumers.py @@ -26,7 +26,7 @@ from functionaltests.api.v1.models import secret_models create_secret_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", diff --git a/functionaltests/api/v1/smoke/test_containers.py b/functionaltests/api/v1/smoke/test_containers.py index a83f5cb5d..d57ca2e80 100644 --- a/functionaltests/api/v1/smoke/test_containers.py +++ b/functionaltests/api/v1/smoke/test_containers.py @@ -23,7 +23,7 @@ from functionaltests.api.v1.models import secret_models create_secret_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", diff --git a/functionaltests/api/v1/smoke/test_secrets.py b/functionaltests/api/v1/smoke/test_secrets.py index 4f126b3a4..fcab48097 100644 --- a/functionaltests/api/v1/smoke/test_secrets.py +++ b/functionaltests/api/v1/smoke/test_secrets.py @@ -24,7 +24,7 @@ from functionaltests.api.v1.models import secret_models default_secret_create_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", @@ -61,7 +61,7 @@ default_secret_create_emptystrings_data = { default_secret_create_two_phase_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", diff --git a/tox.ini b/tox.ini index 75d9014ea..94fd0045e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,7 @@ minversion = 2.0 envlist = py36,py37,pep8,docs skipsdist = True +ignore_basepython_conflict = True [testenv] basepython = python3