From f3bf6be831880eb9a939674252ece9a5cc964847 Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Fri, 9 Feb 2024 18:15:47 +0000 Subject: [PATCH] Updates for caracal testing support These updates, on the master branch, are to support testing the caracal packages and support of the charms for caracal. They do NOT lock the charms down, and don't change the testing branches to stable branches. Change-Id: Ib7947ab8dfd4c4b18c482f4df1a7c6f5b5e3756f --- build-requirements.txt | 7 --- charmcraft.yaml | 6 --- .../contrib/openstack/cert_utils.py | 33 ++++++++----- .../charmhelpers/contrib/openstack/context.py | 11 +++-- .../templates/wsgi-openstack-api.conf | 2 +- .../templates/wsgi-openstack-metadata.conf | 2 +- hooks/charmhelpers/contrib/openstack/utils.py | 25 ++-------- hooks/charmhelpers/core/unitdata.py | 39 ++++++++++++++- hooks/charmhelpers/fetch/snap.py | 2 +- hooks/charmhelpers/fetch/ubuntu.py | 10 ++++ metadata.yaml | 6 +-- tests/bundles/jammy-antelope.yaml | 22 ++++----- tests/bundles/jammy-bobcat.yaml | 22 ++++----- ...{mantic-bobcat.yaml => jammy-caracal.yaml} | 26 +++++----- ...lunar-antelope.yaml => noble-caracal.yaml} | 24 +++++----- tests/tests.yaml | 48 +++++++++---------- tox.ini | 18 +++++-- 17 files changed, 167 insertions(+), 136 deletions(-) delete mode 100644 build-requirements.txt rename tests/bundles/{mantic-bobcat.yaml => jammy-caracal.yaml} (94%) rename tests/bundles/{lunar-antelope.yaml => noble-caracal.yaml} (95%) diff --git a/build-requirements.txt b/build-requirements.txt deleted file mode 100644 index b6d2452f..00000000 --- a/build-requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -# NOTES(lourot): -# * We don't install charmcraft via pip anymore because it anyway spins up a -# container and scp the system's charmcraft snap inside it. So the charmcraft -# snap is necessary on the system anyway. -# * `tox -e build` successfully validated with charmcraft 1.2.1 - -cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. diff --git a/charmcraft.yaml b/charmcraft.yaml index 62a8f5b8..09f03428 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -31,9 +31,3 @@ bases: - name: ubuntu channel: "22.04" architectures: [amd64, s390x, ppc64el, arm64] - - name: ubuntu - channel: "23.04" - architectures: [amd64, s390x, ppc64el, arm64] - - name: ubuntu - channel: "23.10" - architectures: [amd64, s390x, ppc64el, arm64] diff --git a/hooks/charmhelpers/contrib/openstack/cert_utils.py b/hooks/charmhelpers/contrib/openstack/cert_utils.py index a25ca995..6620f59f 100644 --- a/hooks/charmhelpers/contrib/openstack/cert_utils.py +++ b/hooks/charmhelpers/contrib/openstack/cert_utils.py @@ -414,18 +414,27 @@ def get_requests_for_local_unit(relation_name=None): is_legacy_request = set(sent).intersection(legacy_keys) for unit in related_units(rid): data = relation_get(rid=rid, unit=unit) - if data.get(raw_certs_key): - bundles.append({ - 'ca': data['ca'], - 'chain': data.get('chain'), - 'certs': json.loads(data[raw_certs_key])}) - elif is_legacy_request: - bundles.append({ - 'ca': data['ca'], - 'chain': data.get('chain'), - 'certs': {sent['common_name']: - {'cert': data.get(local_name + '.server.cert'), - 'key': data.get(local_name + '.server.key')}}}) + # Note: Bug#2028683 - data may not be available if the certificates + # relation hasn't been populated by the providing charm. If no 'ca' + # in the data then don't attempt the bundle at all. + if data.get('ca'): + if data.get(raw_certs_key): + bundles.append({ + 'ca': data['ca'], + 'chain': data.get('chain'), + 'certs': json.loads(data[raw_certs_key]) + }) + elif is_legacy_request: + bundles.append({ + 'ca': data['ca'], + 'chain': data.get('chain'), + 'certs': { + sent['common_name']: { + 'cert': data.get(local_name + '.server.cert'), + 'key': data.get(local_name + '.server.key') + } + } + }) return bundles diff --git a/hooks/charmhelpers/contrib/openstack/context.py b/hooks/charmhelpers/contrib/openstack/context.py index 24a13d0d..1e667fb0 100644 --- a/hooks/charmhelpers/contrib/openstack/context.py +++ b/hooks/charmhelpers/contrib/openstack/context.py @@ -545,7 +545,7 @@ class IdentityServiceContext(OSContextGenerator): 'internal_auth_url': internal_auth_url, }) - # we keep all veriables in ctxt for compatibility and + # we keep all variables in ctxt for compatibility and # add nested dictionary for keystone_authtoken generic # templating if keystonemiddleware_os_release: @@ -557,6 +557,7 @@ class IdentityServiceContext(OSContextGenerator): # NOTE(jamespage) this is required for >= icehouse # so a missing value just indicates keystone needs # upgrading + ctxt['admin_user_id'] = _resolve('service_user_id') ctxt['admin_tenant_id'] = _resolve('service_tenant_id') ctxt['admin_domain_id'] = _resolve('service_domain_id') return ctxt @@ -1748,9 +1749,9 @@ class WSGIWorkerConfigContext(WorkerConfigContext): def __call__(self): total_processes = _calculate_workers() - enable_wsgi_rotation = config('wsgi-rotation') - if enable_wsgi_rotation is None: - enable_wsgi_rotation = True + enable_wsgi_socket_rotation = config('wsgi-socket-rotation') + if enable_wsgi_socket_rotation is None: + enable_wsgi_socket_rotation = True ctxt = { "service_name": self.service_name, "user": self.user, @@ -1764,7 +1765,7 @@ class WSGIWorkerConfigContext(WorkerConfigContext): "public_processes": int(math.ceil(self.public_process_weight * total_processes)), "threads": 1, - "wsgi_rotation": enable_wsgi_rotation, + "wsgi_socket_rotation": enable_wsgi_socket_rotation, } return ctxt diff --git a/hooks/charmhelpers/contrib/openstack/templates/wsgi-openstack-api.conf b/hooks/charmhelpers/contrib/openstack/templates/wsgi-openstack-api.conf index 2cb735e9..de5f603f 100644 --- a/hooks/charmhelpers/contrib/openstack/templates/wsgi-openstack-api.conf +++ b/hooks/charmhelpers/contrib/openstack/templates/wsgi-openstack-api.conf @@ -12,7 +12,7 @@ Listen {{ admin_port }} Listen {{ public_port }} {% endif -%} -{% if wsgi_rotation -%} +{% if wsgi_socket_rotation -%} WSGISocketRotation On {% else -%} WSGISocketRotation Off diff --git a/hooks/charmhelpers/contrib/openstack/templates/wsgi-openstack-metadata.conf b/hooks/charmhelpers/contrib/openstack/templates/wsgi-openstack-metadata.conf index 2cb735e9..de5f603f 100644 --- a/hooks/charmhelpers/contrib/openstack/templates/wsgi-openstack-metadata.conf +++ b/hooks/charmhelpers/contrib/openstack/templates/wsgi-openstack-metadata.conf @@ -12,7 +12,7 @@ Listen {{ admin_port }} Listen {{ public_port }} {% endif -%} -{% if wsgi_rotation -%} +{% if wsgi_socket_rotation -%} WSGISocketRotation On {% else -%} WSGISocketRotation Off diff --git a/hooks/charmhelpers/contrib/openstack/utils.py b/hooks/charmhelpers/contrib/openstack/utils.py index e98be2c5..da711c65 100644 --- a/hooks/charmhelpers/contrib/openstack/utils.py +++ b/hooks/charmhelpers/contrib/openstack/utils.py @@ -161,6 +161,7 @@ OPENSTACK_CODENAMES = OrderedDict([ ('2022.2', 'zed'), ('2023.1', 'antelope'), ('2023.2', 'bobcat'), + ('2024.1', 'caracal'), ]) # The ugly duckling - must list releases oldest to newest @@ -416,17 +417,6 @@ def get_os_version_codename(codename, version_map=OPENSTACK_CODENAMES, error_out(e) -def get_os_version_codename_swift(codename): - '''Determine OpenStack version number of swift from codename.''' - # for k, v in six.iteritems(SWIFT_CODENAMES): - for k, v in SWIFT_CODENAMES.items(): - if k == codename: - return v[-1] - e = 'Could not derive swift version for '\ - 'codename: %s' % codename - error_out(e) - - def get_swift_codename(version): '''Determine OpenStack codename that corresponds to swift version.''' codenames = [k for k, v in SWIFT_CODENAMES.items() if version in v] @@ -585,7 +575,6 @@ def get_installed_os_version(): return openstack_release().get('OPENSTACK_CODENAME') -@cached def openstack_release(): """Return /etc/os-release in a dict.""" d = {} @@ -847,14 +836,10 @@ def openstack_upgrade_available(package): if not cur_vers: # The package has not been installed yet do not attempt upgrade return False - if "swift" in package: - codename = get_os_codename_install_source(src) - avail_vers = get_os_version_codename_swift(codename) - else: - try: - avail_vers = get_os_version_install_source(src) - except Exception: - avail_vers = cur_vers + try: + avail_vers = get_os_version_install_source(src) + except Exception: + avail_vers = cur_vers apt.init() return apt.version_compare(avail_vers, cur_vers) >= 1 diff --git a/hooks/charmhelpers/core/unitdata.py b/hooks/charmhelpers/core/unitdata.py index 8f4bbc61..65153f1f 100644 --- a/hooks/charmhelpers/core/unitdata.py +++ b/hooks/charmhelpers/core/unitdata.py @@ -151,6 +151,7 @@ import contextlib import datetime import itertools import json +import logging import os import pprint import sqlite3 @@ -521,6 +522,42 @@ _KV = None def kv(): global _KV + + # If we are running unit tests, it is useful to go into memory-backed KV store to + # avoid concurrency issues when running multiple tests. This is not a + # problem when juju is running normally. + + env_var = os.environ.get("CHARM_HELPERS_TESTMODE", "auto").lower() + if env_var not in ["auto", "no", "yes"]: + logging.warning("Unknown value for CHARM_HELPERS_TESTMODE '%s'" + ", assuming 'no'", env_var) + env_var = "no" + + if env_var == "no": + in_memory_db = False + elif env_var == "yes": + in_memory_db = True + elif env_var == "auto": + # If UNIT_STATE_DB is set, respect this request + if "UNIT_STATE_DB" in os.environ: + in_memory_db = False + # Autodetect normal juju execution by looking for juju variables + elif "JUJU_CHARM_DIR" in os.environ or "JUJU_UNIT_NAME" in os.environ: + in_memory_db = False + else: + # We are probably running in unit test mode + logging.warning("Auto-detected unit test environment for KV store.") + in_memory_db = True + else: + # Help the linter realise that in_memory_db is always set + raise Exception("Cannot reach this line") + if _KV is None: - _KV = Storage() + if in_memory_db: + _KV = Storage(":memory:") + else: + _KV = Storage() + else: + if in_memory_db and _KV.db_path != ":memory:": + logging.warning("Running with in_memory_db and KV is not set to :memory:") return _KV diff --git a/hooks/charmhelpers/fetch/snap.py b/hooks/charmhelpers/fetch/snap.py index 36d6bce9..7ab7ce3e 100644 --- a/hooks/charmhelpers/fetch/snap.py +++ b/hooks/charmhelpers/fetch/snap.py @@ -52,7 +52,7 @@ def _snap_exec(commands): :param commands: List commands :return: Integer exit code """ - assert type(commands) == list + assert isinstance(commands, list) retry_count = 0 return_code = None diff --git a/hooks/charmhelpers/fetch/ubuntu.py b/hooks/charmhelpers/fetch/ubuntu.py index 1be992c4..d0089eb7 100644 --- a/hooks/charmhelpers/fetch/ubuntu.py +++ b/hooks/charmhelpers/fetch/ubuntu.py @@ -246,6 +246,14 @@ CLOUD_ARCHIVE_POCKETS = { 'bobcat/proposed': 'jammy-proposed/bobcat', 'jammy-bobcat/proposed': 'jammy-proposed/bobcat', 'jammy-proposed/bobcat': 'jammy-proposed/bobcat', + # caracal + 'caracal': 'jammy-updates/caracal', + 'jammy-caracal': 'jammy-updates/caracal', + 'jammy-caracal/updates': 'jammy-updates/caracal', + 'jammy-updates/caracal': 'jammy-updates/caracal', + 'caracal/proposed': 'jammy-proposed/caracal', + 'jammy-caracal/proposed': 'jammy-proposed/caracal', + 'jammy-proposed/caracal': 'jammy-proposed/caracal', # OVN 'focal-ovn-22.03': 'focal-updates/ovn-22.03', @@ -279,6 +287,7 @@ OPENSTACK_RELEASES = ( 'zed', 'antelope', 'bobcat', + 'caracal', ) @@ -308,6 +317,7 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([ ('kinetic', 'zed'), ('lunar', 'antelope'), ('mantic', 'bobcat'), + ('noble', 'caracal'), ]) diff --git a/metadata.yaml b/metadata.yaml index 8d63e25f..ca1571c3 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -10,11 +10,9 @@ description: | directly to physical servers. docs: https://discourse.charmhub.io/t/nova-compute-docs-index/10552 tags: -- openstack + - openstack series: -- jammy -- lunar -- mantic + - jammy provides: cloud-compute: interface: nova-compute diff --git a/tests/bundles/jammy-antelope.yaml b/tests/bundles/jammy-antelope.yaml index 256cf94f..7c97a4aa 100644 --- a/tests/bundles/jammy-antelope.yaml +++ b/tests/bundles/jammy-antelope.yaml @@ -69,7 +69,7 @@ applications: barbican: charm: ch:barbican - channel: latest/edge + channel: 2024.1/edge num_units: 1 options: openstack-origin: *openstack-origin @@ -78,7 +78,7 @@ applications: barbican-vault: charm: ch:barbican-vault - channel: latest/edge + channel: 2024.1/edge num_units: 0 vault: @@ -102,7 +102,7 @@ applications: - '14' - '15' - '16' - channel: latest/edge + channel: reef/edge ceph-mon: charm: ch:ceph-mon @@ -114,7 +114,7 @@ applications: - '17' - '18' - '19' - channel: latest/edge + channel: reef/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -132,7 +132,7 @@ applications: debug: true to: - '4' - channel: latest/edge + channel: 2024.1/edge neutron-api: charm: ch:neutron-api @@ -144,7 +144,7 @@ applications: neutron-security-groups: true to: - '5' - channel: latest/edge + channel: 2024.1/edge keystone: charm: ch:keystone @@ -153,7 +153,7 @@ applications: openstack-origin: *openstack-origin to: - '6' - channel: latest/edge + channel: 2024.1/edge neutron-gateway: charm: ch:neutron-gateway @@ -163,7 +163,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '7' - channel: latest/edge + channel: 2024.1/edge glance: charm: ch:glance @@ -172,11 +172,11 @@ applications: openstack-origin: *openstack-origin to: - '8' - channel: latest/edge + channel: 2024.1/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: latest/edge + channel: 2024.1/edge placement: charm: ch:placement @@ -185,7 +185,7 @@ applications: openstack-origin: *openstack-origin to: - '9' - channel: latest/edge + channel: 2024.1/edge nova-compute: charm: ../../nova-compute.charm diff --git a/tests/bundles/jammy-bobcat.yaml b/tests/bundles/jammy-bobcat.yaml index c21f83f0..ee1f20ab 100644 --- a/tests/bundles/jammy-bobcat.yaml +++ b/tests/bundles/jammy-bobcat.yaml @@ -69,7 +69,7 @@ applications: barbican: charm: ch:barbican - channel: latest/edge + channel: 2024.1/edge num_units: 1 options: openstack-origin: *openstack-origin @@ -78,7 +78,7 @@ applications: barbican-vault: charm: ch:barbican-vault - channel: latest/edge + channel: 2024.1/edge num_units: 0 vault: @@ -102,7 +102,7 @@ applications: - '14' - '15' - '16' - channel: latest/edge + channel: reef/edge ceph-mon: charm: ch:ceph-mon @@ -114,7 +114,7 @@ applications: - '17' - '18' - '19' - channel: latest/edge + channel: reef/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -132,7 +132,7 @@ applications: debug: true to: - '4' - channel: latest/edge + channel: 2024.1/edge neutron-api: charm: ch:neutron-api @@ -144,7 +144,7 @@ applications: neutron-security-groups: true to: - '5' - channel: latest/edge + channel: 2024.1/edge keystone: charm: ch:keystone @@ -153,7 +153,7 @@ applications: openstack-origin: *openstack-origin to: - '6' - channel: latest/edge + channel: 2024.1/edge neutron-gateway: charm: ch:neutron-gateway @@ -163,7 +163,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '7' - channel: latest/edge + channel: 2024.1/edge glance: charm: ch:glance @@ -172,11 +172,11 @@ applications: openstack-origin: *openstack-origin to: - '8' - channel: latest/edge + channel: 2024.1/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: latest/edge + channel: 2024.1/edge placement: charm: ch:placement @@ -185,7 +185,7 @@ applications: openstack-origin: *openstack-origin to: - '9' - channel: latest/edge + channel: 2024.1/edge nova-compute: charm: ../../nova-compute.charm diff --git a/tests/bundles/mantic-bobcat.yaml b/tests/bundles/jammy-caracal.yaml similarity index 94% rename from tests/bundles/mantic-bobcat.yaml rename to tests/bundles/jammy-caracal.yaml index ab0e9e99..a692be05 100644 --- a/tests/bundles/mantic-bobcat.yaml +++ b/tests/bundles/jammy-caracal.yaml @@ -1,7 +1,7 @@ variables: - openstack-origin: &openstack-origin distro + openstack-origin: &openstack-origin cloud:jammy-caracal -series: mantic +series: jammy comment: - 'machines section to decide order of deployment. database sooner = faster' @@ -69,7 +69,7 @@ applications: barbican: charm: ch:barbican - channel: latest/edge + channel: 2024.1/edge num_units: 1 options: openstack-origin: *openstack-origin @@ -78,7 +78,7 @@ applications: barbican-vault: charm: ch:barbican-vault - channel: latest/edge + channel: 2024.1/edge num_units: 0 vault: @@ -102,7 +102,7 @@ applications: - '14' - '15' - '16' - channel: latest/edge + channel: reef/edge ceph-mon: charm: ch:ceph-mon @@ -114,7 +114,7 @@ applications: - '17' - '18' - '19' - channel: latest/edge + channel: reef/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -132,7 +132,7 @@ applications: debug: true to: - '4' - channel: latest/edge + channel: 2024.1/edge neutron-api: charm: ch:neutron-api @@ -144,7 +144,7 @@ applications: neutron-security-groups: true to: - '5' - channel: latest/edge + channel: 2024.1/edge keystone: charm: ch:keystone @@ -153,7 +153,7 @@ applications: openstack-origin: *openstack-origin to: - '6' - channel: latest/edge + channel: 2024.1/edge neutron-gateway: charm: ch:neutron-gateway @@ -163,7 +163,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '7' - channel: latest/edge + channel: 2024.1/edge glance: charm: ch:glance @@ -172,11 +172,11 @@ applications: openstack-origin: *openstack-origin to: - '8' - channel: latest/edge + channel: 2024.1/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: latest/edge + channel: 2024.1/edge placement: charm: ch:placement @@ -185,7 +185,7 @@ applications: openstack-origin: *openstack-origin to: - '9' - channel: latest/edge + channel: 2024.1/edge nova-compute: charm: ../../nova-compute.charm diff --git a/tests/bundles/lunar-antelope.yaml b/tests/bundles/noble-caracal.yaml similarity index 95% rename from tests/bundles/lunar-antelope.yaml rename to tests/bundles/noble-caracal.yaml index 46493c9f..afd1d4d7 100644 --- a/tests/bundles/lunar-antelope.yaml +++ b/tests/bundles/noble-caracal.yaml @@ -1,7 +1,7 @@ variables: openstack-origin: &openstack-origin distro -series: lunar +series: noble comment: - 'machines section to decide order of deployment. database sooner = faster' @@ -69,7 +69,7 @@ applications: barbican: charm: ch:barbican - channel: latest/edge + channel: 2024.1/edge num_units: 1 options: openstack-origin: *openstack-origin @@ -78,7 +78,7 @@ applications: barbican-vault: charm: ch:barbican-vault - channel: latest/edge + channel: 2024.1/edge num_units: 0 vault: @@ -102,7 +102,7 @@ applications: - '14' - '15' - '16' - channel: latest/edge + channel: reef/edge ceph-mon: charm: ch:ceph-mon @@ -114,7 +114,7 @@ applications: - '17' - '18' - '19' - channel: latest/edge + channel: reef/edge rabbitmq-server: charm: ch:rabbitmq-server @@ -132,7 +132,7 @@ applications: debug: true to: - '4' - channel: latest/edge + channel: 2024.1/edge neutron-api: charm: ch:neutron-api @@ -144,7 +144,7 @@ applications: neutron-security-groups: true to: - '5' - channel: latest/edge + channel: 2024.1/edge keystone: charm: ch:keystone @@ -153,7 +153,7 @@ applications: openstack-origin: *openstack-origin to: - '6' - channel: latest/edge + channel: 2024.1/edge neutron-gateway: charm: ch:neutron-gateway @@ -163,7 +163,7 @@ applications: bridge-mappings: physnet1:br-ex to: - '7' - channel: latest/edge + channel: 2024.1/edge glance: charm: ch:glance @@ -172,11 +172,11 @@ applications: openstack-origin: *openstack-origin to: - '8' - channel: latest/edge + channel: 2024.1/edge neutron-openvswitch: charm: ch:neutron-openvswitch - channel: latest/edge + channel: 2024.1/edge placement: charm: ch:placement @@ -185,7 +185,7 @@ applications: openstack-origin: *openstack-origin to: - '9' - channel: latest/edge + channel: 2024.1/edge nova-compute: charm: ../../nova-compute.charm diff --git a/tests/tests.yaml b/tests/tests.yaml index 8e6cae4a..be00bb8d 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,25 +1,22 @@ charm_name: nova-compute smoke_bundles: -- jammy-antelope - + - jammy-caracal gate_bundles: -- jammy-antelope - + - jammy-antelope + - jammy-bobcat + - jammy-caracal dev_bundles: -- jammy-bobcat -- lunar-antelope -- mantic-bobcat - + - noble-caracal configure: -- zaza.openstack.charm_tests.vault.setup.auto_initialize_no_validation_no_wait -- zaza.openstack.charm_tests.glance.setup.add_cirros_image -- zaza.openstack.charm_tests.glance.setup.add_lts_image -- zaza.openstack.charm_tests.glance.setup.add_uefi_image -- zaza.openstack.charm_tests.keystone.setup.add_demo_user -- zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network -- zaza.openstack.charm_tests.nova.setup.create_flavors -- zaza.openstack.charm_tests.nova.setup.manage_ssh_key + - zaza.openstack.charm_tests.vault.setup.auto_initialize_no_validation_no_wait + - zaza.openstack.charm_tests.glance.setup.add_cirros_image + - zaza.openstack.charm_tests.glance.setup.add_lts_image + - zaza.openstack.charm_tests.glance.setup.add_uefi_image + - zaza.openstack.charm_tests.keystone.setup.add_demo_user + - zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network + - zaza.openstack.charm_tests.nova.setup.create_flavors + - zaza.openstack.charm_tests.nova.setup.manage_ssh_key target_deploy_status: barbican-vault: @@ -30,16 +27,15 @@ target_deploy_status: workload-status-message-prefix: "Vault needs to be initialized" tests: -- zaza.openstack.charm_tests.nova.tests.CirrosGuestCreateTest -- zaza.openstack.charm_tests.nova.tests.LTSGuestCreateTest -- zaza.openstack.charm_tests.nova.tests.VTPMGuestCreateTest -- zaza.openstack.charm_tests.nova.tests.CloudActions -- zaza.openstack.charm_tests.nova.tests.NovaCompute -- zaza.openstack.charm_tests.nova.tests.SecurityTests -- zaza.openstack.charm_tests.ceph.tests.CheckPoolTypes -- zaza.openstack.charm_tests.ceph.tests.BlueStoreCompressionCharmOperation + - zaza.openstack.charm_tests.nova.tests.CirrosGuestCreateTest + - zaza.openstack.charm_tests.nova.tests.LTSGuestCreateTest + - zaza.openstack.charm_tests.nova.tests.VTPMGuestCreateTest + - zaza.openstack.charm_tests.nova.tests.CloudActions + - zaza.openstack.charm_tests.nova.tests.NovaCompute + - zaza.openstack.charm_tests.nova.tests.SecurityTests + - zaza.openstack.charm_tests.ceph.tests.CheckPoolTypes + - zaza.openstack.charm_tests.ceph.tests.BlueStoreCompressionCharmOperation tests_options: force_deploy: - - lunar-antelope - - mantic-bobcat + - noble-caracal diff --git a/tox.ini b/tox.ini index 32e9ac25..510a1c03 100644 --- a/tox.ini +++ b/tox.ini @@ -33,11 +33,13 @@ passenv = CS_* OS_* TEST_* -deps = -r{toxinidir}/test-requirements.txt +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -r{toxinidir}/test-requirements.txt [testenv:build] basepython = python3 -deps = -r{toxinidir}/build-requirements.txt +deps = commands = charmcraft clean charmcraft -v pack @@ -45,12 +47,16 @@ commands = [testenv:py310] basepython = python3.10 -deps = -r{toxinidir}/requirements.txt +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt [testenv:py3] basepython = python3 -deps = -r{toxinidir}/requirements.txt +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt [testenv:pep8] @@ -64,7 +70,9 @@ commands = flake8 {posargs} hooks unit_tests tests actions lib files # Technique based heavily upon # https://github.com/openstack/nova/blob/master/tox.ini basepython = python3 -deps = -r{toxinidir}/requirements.txt +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt setenv = {[testenv]setenv}