Updates for opendev & jammy enablement

- Add .zuul.yaml to run gate testing
- charmcraft: build-on 20.04 -> run-on 20.04/22.04 [*archs]
- Refresh tox targets
- Add jammy metadata
- Default source is yoga
- fix typo in ganesha-client property

Change-Id: Iddf3e97078bc397ace4995f53417837445579fa3
This commit is contained in:
Chris MacNaughton 2022-04-20 07:44:10 +02:00
parent d8d66cf576
commit 79f488332c
9 changed files with 36 additions and 19 deletions

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.opendev.org
port=29418
project=openstack/charm-ceph-nfs.git

4
.zuul.yaml Normal file
View File

@ -0,0 +1,4 @@
- project:
templates:
- openstack-python3-charm-yoga-jobs
- openstack-cover-jobs

View File

@ -19,8 +19,17 @@ parts:
apt update apt update
apt install -y ca-certificates apt install -y ca-certificates
update-ca-certificates update-ca-certificates
bases: bases:
- name: ubuntu - build-on:
channel: "20.04" - name: ubuntu
architectures: channel: "20.04"
- amd64 architectures:
- amd64
run-on:
- name: ubuntu
channel: "20.04"
architectures: [amd64, s390x, ppc64el, arm64]
- name: ubuntu
channel: "22.04"
architectures: [amd64, s390x, ppc64el, arm64]

View File

@ -10,7 +10,7 @@
options: options:
source: source:
type: string type: string
default: proposed default: yoga
description: | description: |
Optional configuration to support use of additional sources such as: Optional configuration to support use of additional sources such as:
- ppa:myteam/ppa - ppa:myteam/ppa

View File

@ -9,9 +9,7 @@ tags:
- misc - misc
series: series:
- focal - focal
- groovy - jammy
- hirsute
- impish
subordinate: false subordinate: false
min-juju-version: 2.7.6 min-juju-version: 2.7.6
extra-bindings: extra-bindings:

View File

@ -1,6 +1,7 @@
- project: - project:
templates: templates:
- charm-unit-jobs - charm-unit-jobs-py38
- charm-unit-jobs-py39
check: check:
jobs: jobs:
- focal-pacific - focal-pacific
@ -12,12 +13,10 @@
name: focal-pacific name: focal-pacific
parent: func-target parent: func-target
dependencies: dependencies:
charm-build - charm-build
- osci-lint - osci-lint
- tox-py35
- tox-py36
- tox-py37
- tox-py38 - tox-py38
- tox-py39
vars: vars:
tox_extra_args: focal-pacific tox_extra_args: focal-pacific
- job: - job:
@ -26,9 +25,7 @@
dependencies: dependencies:
- charm-build - charm-build
- osci-lint - osci-lint
- tox-py35
- tox-py36
- tox-py37
- tox-py38 - tox-py38
- tox-py39
vars: vars:
tox_extra_args: focal-quincy tox_extra_args: focal-quincy

View File

@ -244,7 +244,7 @@ class CephNFSCharm(
@property @property
def ganesha_client(self): def ganesha_client(self):
GaneshaNFS(self.client_name, self.pool_name) return GaneshaNFS(self.client_name, self.pool_name)
def request_ceph_pool(self, event): def request_ceph_pool(self, event):
"""Request pools from Ceph cluster.""" """Request pools from Ceph cluster."""

View File

@ -111,7 +111,7 @@ class NfsGaneshaTest(unittest.TestCase):
def _write_testing_file_on_instance(self, instance_name: str): def _write_testing_file_on_instance(self, instance_name: str):
zaza.utilities.generic.run_via_ssh( zaza.utilities.generic.run_via_ssh(
unit_name=instance_name, unit_name=instance_name,
cmd='echo "test" | sudo tee {}/test'.format(self.mount_dir)) cmd='echo -n "test" | sudo tee {}/test'.format(self.mount_dir))
@tenacity.retry( @tenacity.retry(
stop=tenacity.stop_after_attempt(5), stop=tenacity.stop_after_attempt(5),
@ -121,7 +121,7 @@ class NfsGaneshaTest(unittest.TestCase):
output = run_with_juju_ssh( output = run_with_juju_ssh(
'sudo cat {}/test'.format(self.mount_dir)) 'sudo cat {}/test'.format(self.mount_dir))
logging.info("Verification output: {}".format(output)) logging.info("Verification output: {}".format(output))
self.assertEqual('test\r\n', output) self.assertEqual('test', output.strip())
def test_create_share(self): def test_create_share(self):
logging.info("Creating a share") logging.info("Creating a share")

View File

@ -65,6 +65,11 @@ basepython = python3.9
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
[testenv:py310]
basepython = python3.10
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:py3] [testenv:py3]
basepython = python3 basepython = python3
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt