py3: Switch manila to run under Python 3 at Rocky

Switch charm to run manila under Python 3 for Rocky or later:

 - Force use of python3-manila
 - Purge python-* packages previously installed on upgrade
 - Tag charm class as python 3

Change-Id: I750a63a4d913cd847d2fb24e7396764079f18524
This commit is contained in:
James Page 2018-09-18 15:23:09 +02:00
parent 469cf6fc4e
commit 48c65577a6
2 changed files with 22 additions and 1 deletions

View File

@ -430,3 +430,24 @@ class ManilaCharm(charms_openstack.charm.HAOpenStackCharm):
for config_file, chunks in data.items():
config_files.add(config_file)
return list(config_files)
class ManilaCharmRocky(ManilaCharm):
release = 'rocky'
packages = [
'manila-api',
'manila-data',
'manila-scheduler',
'manila-share',
'python3-manila',
]
purge_packages = [
'python-manila',
'python-memcache',
'python-pymysql',
]
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!)