py3: deal with more subordinate dependencies

Ensure subordinate py3 packages are installed if their py2
counter-parts are currently installed for neutron-openvswitch
and ceilometer-agent.

Change-Id: I940fb2ce9d671e919c817cee7adda2ac22ecb3fb
Closes-Bug: #1816299
This commit is contained in:
Corey Bryant 2019-02-19 20:15:30 +00:00
parent be3f9519f1
commit 32ef5b4cca
2 changed files with 9 additions and 1 deletions

View File

@ -138,7 +138,10 @@ PY3_PACKAGES = [
]
PURGE_PACKAGES = [
'python-ceilometer',
'python-neutron',
'python-nova',
'python-nova-lxd',
]
MULTIPATH_PACKAGES = [
@ -437,6 +440,10 @@ def determine_packages():
if cmp_release >= 'rocky':
packages = [p for p in packages if not p.startswith('python-')]
packages.extend(PY3_PACKAGES)
if filter_missing_packages(['python-ceilometer']):
packages.append('python3-ceilometer')
if filter_missing_packages(['python-neutron']):
packages.append('python3-neutron')
if virt_type == 'lxd':
packages.append('python3-nova-lxd')

View File

@ -150,7 +150,8 @@ class NovaComputeUtilsTests(CharmTestCase):
[p for p in utils.BASE_PACKAGES
if not p.startswith('python-')] +
['nova-compute-kvm'] +
utils.PY3_PACKAGES
utils.PY3_PACKAGES +
['python3-ceilometer', 'python3-neutron']
)
self.assertEqual(ex, result)