ci: Add Zuul configuration
Add configuration for Zuul checks. Add gitreview configuration. Pick fixes from: Ia13d002aca1bd0c10e7c7a824e74303bddc07d25 to ensure that tests actually pass. Add missing py310 tox target. Fix charm-ops-openstack dependency Fix test bundle deployment Fix string quotation in overlay test bundle Fix j2 templates inclusion in coverage report Co-Authored-By: Nikolay Vinogradov <nikolay.vinogradov@canonical.com> Change-Id: Ia0b7a1fa43b1a689a7554b503d42ccb944e7c45f
This commit is contained in:
parent
86e4b1ae52
commit
0de933048d
5
.gitreview
Normal file
5
.gitreview
Normal file
@ -0,0 +1,5 @@
|
||||
[gerrit]
|
||||
host=review.opendev.org
|
||||
port=29418
|
||||
project=openstack/charm-manila-infinidat.git
|
||||
defaultbranch=main
|
4
.zuul.yaml
Normal file
4
.zuul.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
- project:
|
||||
templates:
|
||||
- openstack-python3-charm-yoga-jobs
|
||||
- openstack-cover-jobs
|
@ -1,2 +1,2 @@
|
||||
ops
|
||||
git+https://github.com/nikolayvinogradov/charm-ops-openstack@nickv#egg=ops_openstack
|
||||
git+https://opendev.org/openstack/charm-ops-openstack#egg=ops_openstack
|
||||
|
@ -72,7 +72,7 @@ class ManilaInfinidatPluginCharm(OSBaseCharm):
|
||||
|
||||
def on_config(self, event):
|
||||
self.on_manila_plugin(event)
|
||||
self.set_started(started=True)
|
||||
self._stored.is_started = True
|
||||
if self.framework.model.relations.get(RELATION_NAME):
|
||||
self.send_backend_config()
|
||||
self.unit.status = ActiveStatus('Unit is ready')
|
||||
|
@ -18,7 +18,7 @@ variables:
|
||||
ovn-channel: &ovn-channel latest/stable
|
||||
openstack-channel: &openstack-channel ussuri/edge
|
||||
mysql-channel: &mysql-channel 8.0/stable
|
||||
repo-infinidat-apt-key: &repo-infinidat-apt-key >
|
||||
repo-infinidat-apt-key: &repo-infinidat-apt-key |
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1.4.11 (GNU/Linux)
|
||||
|
||||
@ -327,8 +327,7 @@ applications:
|
||||
channel: *openstack-channel
|
||||
options:
|
||||
openstack-origin: *openstack-origin
|
||||
default-share-backend: 'iscsi'
|
||||
pool: 'manila'
|
||||
default-share-backend: 'nas'
|
||||
to:
|
||||
- 'lxd:0'
|
||||
manila-mysql-router:
|
||||
|
@ -1,9 +1,9 @@
|
||||
applications:
|
||||
manila-infinidat:
|
||||
options:
|
||||
infinibox-ip: {{ OS_INFINIBOX_IP }}
|
||||
infinibox-login: {{ OS_INFINIBOX_LOGIN }}
|
||||
infinibox-password: {{ OS_INFINIBOX_PASSWORD }}
|
||||
infinibox-ip: "{{ OS_INFINIBOX_IP }}"
|
||||
infinibox-login: "{{ OS_INFINIBOX_LOGIN }}"
|
||||
infinibox-password: "{{ OS_INFINIBOX_PASSWORD }}"
|
||||
# network space of type NAS on the Infinibox side
|
||||
nas-network-space-name: {{ OS_INFINIBOX_NAS_NETSPACE | default('nas') }}
|
||||
pool-name: {{ OS_INFINIBOX_POOL_NAME | default('manila') }}
|
||||
nas-network-space-name: "{{ OS_INFINIBOX_NAS_NETSPACE | default('nas') }}"
|
||||
pool-name: "{{ OS_INFINIBOX_POOL_NAME | default('manila') }}"
|
||||
|
@ -17,20 +17,26 @@
|
||||
"""Encapsulate manila-infinidat testing."""
|
||||
|
||||
|
||||
import zaza.openstack.charm_tests.test_utils as test_utils
|
||||
import zaza.openstack.charm_tests.manila.tests as manila_tests
|
||||
import zaza.openstack.utilities.openstack as openstack_utils
|
||||
from manilaclient import client as manilaclient
|
||||
|
||||
|
||||
def configure_infinidat_share_type():
|
||||
auth = openstack_utils.get_overcloud_auth()
|
||||
keystone_session = openstack_utils.get_overcloud_keystone_session()
|
||||
|
||||
mcl = manilaclient.Client(
|
||||
session=cls.keystone_session,
|
||||
client_version='2',
|
||||
cacert='/var/snap/openstackclients/common/cacert')
|
||||
session=keystone_session,
|
||||
client_version='2',
|
||||
cacert=auth.get('OS_CACERT', None))
|
||||
|
||||
share_type = mcl.share_types.find(name='infinidat')
|
||||
if not share_type:
|
||||
share_type = mcl.share_types.create(name='infinidat',
|
||||
specs_driver_handles_file_share=False)
|
||||
share_type = mcl.share_types.create(
|
||||
name='infinidat',
|
||||
specs_driver_handles_file_share=False)
|
||||
|
||||
|
||||
class ManilaInfinidatTest(manila_tests.ManilaBaseTest):
|
||||
"""Encapsulate Manila Infinidat NFS test."""
|
||||
@ -48,9 +54,9 @@ class ManilaInfinidatTest(manila_tests.ManilaBaseTest):
|
||||
# https://bugs.launchpad.net/python-manilaclient/+bug/1989577
|
||||
# might be relevant
|
||||
mcl = manilaclient.Client(
|
||||
session=cls.keystone_session,
|
||||
client_version='2',
|
||||
cacert=auth.get('OS_CACERT',None))
|
||||
session=cls.keystone_session,
|
||||
client_version='2',
|
||||
cacert=auth.get('OS_CACERT', None))
|
||||
|
||||
mcl = openstack_utils.get_manila_session_client(cls.keystone_session)
|
||||
|
||||
|
6
tox.ini
6
tox.ini
@ -64,6 +64,11 @@ basepython = python3.9
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:py310]
|
||||
basepython = python3.10
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:py3]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
@ -102,6 +107,7 @@ omit =
|
||||
.tox/*
|
||||
*/charmhelpers/*
|
||||
unit_tests/*
|
||||
templates/parts/backends
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
|
Loading…
Reference in New Issue
Block a user