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 install -y ca-certificates
update-ca-certificates
bases:
- build-on:
- name: ubuntu
channel: "20.04"
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:
source:
type: string
default: proposed
default: yoga
description: |
Optional configuration to support use of additional sources such as:
- ppa:myteam/ppa

View File

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

View File

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

View File

@ -244,7 +244,7 @@ class CephNFSCharm(
@property
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):
"""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):
zaza.utilities.generic.run_via_ssh(
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(
stop=tenacity.stop_after_attempt(5),
@ -121,7 +121,7 @@ class NfsGaneshaTest(unittest.TestCase):
output = run_with_juju_ssh(
'sudo cat {}/test'.format(self.mount_dir))
logging.info("Verification output: {}".format(output))
self.assertEqual('test\r\n', output)
self.assertEqual('test', output.strip())
def test_create_share(self):
logging.info("Creating a share")

View File

@ -65,6 +65,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