py3: Switch to using Python 3 for rocky or later

Switch package install to Python 3 for OpenStack Rocky or later.

Change-Id: I5ea8e4d7011774c10af2823b68e12fbb26ec81d9
This commit is contained in:
Corey Bryant 2018-09-18 13:34:48 +00:00
parent 48863972e5
commit 695175f4c1
2 changed files with 19 additions and 1 deletions

View File

@ -256,3 +256,21 @@ class BarbicanCharm(charms_openstack.charm.HAOpenStackCharm):
required_relations.append('hsm')
return super(BarbicanCharm, self).states_to_check(
required_relations=required_relations)
class BarbicanCharmRocky(BarbicanCharm):
release = 'rocky'
packages = [
'barbican-common', 'barbican-api', 'barbican-worker',
'python3-barbican', 'libapache2-mod-wsgi-py3',
'python-apt', # NOTE: workaround for hacluster suboridinate
]
purge_packages = [
'python-barbican',
'python-mysqldb'
]
python_version = 3

View File

@ -35,7 +35,7 @@ commands =
# Run a specific test as an Amulet smoke test (expected to always pass)
basepython = python2.7
commands =
bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-queens --no-destroy
bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-rocky --no-destroy
[testenv:func27-dfs]
# Run all deploy-from-source tests which are +x (may not always pass!)