Browse Source

Enable Rocky and python3

When the primary keystone is deployed with rocky and python3 the charm
fails to install the correct python3 packages and use the correct
clients.

Note: A related bug #1798184, will cause the tests to fail. A complete
Rocky python3 solution is dependent on #1798184 being resolved.

Change-Id: I42d8a5bfff3200d18e7bad0bd29edf12aa6a05c7
Closes-Bug: #1806111
changes/75/621275/5
David Ames 1 year ago
committed by Corey Bryant
parent
commit
4163fdcbee
3 changed files with 17 additions and 2 deletions
  1. +15
    -0
      src/lib/charm/openstack/keystone_ldap.py
  2. +1
    -1
      src/tox.ini
  3. +1
    -1
      unit_tests/test_keystone_ldap_handlers.py

+ 15
- 0
src/lib/charm/openstack/keystone_ldap.py View File

@@ -175,3 +175,18 @@ class KeystoneLDAPCharm(charms_openstack.charm.OpenStackCharm):
if (hookenv.config('tls-ca-ldap') and
os.path.exists(self.options.backend_ca_file)):
os.unlink(self.options.backend_ca_file)


class KeystoneLDAPCharmRocky(KeystoneLDAPCharm):

# First release supported
release = 'rocky'

# List of packages to install for this charm
# Explicitly install python3-ldap so python3-ldappool does not install
# python-ldap
packages = ['python3-ldap', 'python3-ldappool']

purge_packages = ['python-ldap', 'python-ldappool']

python_version = 3

+ 1
- 1
src/tox.ini 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!)


+ 1
- 1
unit_tests/test_keystone_ldap_handlers.py View File

@@ -15,7 +15,7 @@ from __future__ import print_function
import mock

from charms_openstack.test_mocks import charmhelpers as ch
ch.contrib.openstack.utils.OPENSTACK_RELEASES = ('mitaka', )
ch.contrib.openstack.utils.OPENSTACK_RELEASES = ('mitaka', 'rocky')

import reactive.keystone_ldap_handlers as handlers



Loading…
Cancel
Save