misc: add gerrit integration

Add zuul configuration.

Add gitreview configuration.

Add custom status check to ensure charm units remain in a blocked
state until the nfs-shares configuration option is set.

Change-Id: I01257c143109865adf3c88e687da3c8d440eff81
This commit is contained in:
James Page 2020-04-20 11:34:21 +01:00
parent 72429cac85
commit 85a4f525ce
6 changed files with 20 additions and 28 deletions

4
.gitreview Normal file
View File

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

5
.zuul.yaml Normal file
View File

@ -0,0 +1,5 @@
- project:
templates:
- python35-charm-jobs
- openstack-python3-ussuri-jobs
- openstack-cover-jobs

View File

@ -1,10 +1,3 @@
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos. See the 'global' dir contents for available
# choices of *requirements.txt files for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
#
# Build requirements
charm-tools>=2.4.4
# importlib-resources 1.1.0 removed Python 3.5 support
importlib-resources<1.1.0
# Requirements to build the charm
charm-tools
simplejson

View File

@ -134,3 +134,9 @@ class TrilioDataMoverCharm(charms_openstack.charm.OpenStackCharm):
os.mkdir(ghost_share_path)
host.mount(nfs_share_path, ghost_share_path, options="bind")
def custom_assess_status_check(self):
"""Check required configuration options are set"""
if not hookenv.config("nfs-shares"):
return "blocked", "nfs-shares configuration not set"
return None, None

View File

@ -5,4 +5,4 @@
#
# Functional Test Requirements (let Zaza's dependencies solve all dependencies here!)
git+https://github.com/openstack-charmers/zaza.git#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
git+https://github.com/javacruft/zaza-openstack-tests.git@triliovault-testing#egg=zaza.openstack

View File

@ -1,23 +1,7 @@
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos. See the 'global' dir contents for available
# choices of *requirements.txt files for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
#
# Lint and unit test requirements
# Unit test requirements
flake8>=2.2.4
stestr>=2.2.0
requests>=2.18.4
charms.reactive
mock>=1.2
nose>=1.3.7
coverage>=3.6
git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack
#
# Revisit for removal / mock improvement:
netifaces # vault
psycopg2-binary # vault
tenacity # vault
pbr # vault
cryptography # vault, keystone-saml-mellon
lxml # keystone-saml-mellon
hvac # vault, barbican-vault
git+https://github.com/openstack/charms.openstack#egg=charms.openstack