diff --git a/charmhelpers/contrib/openstack/utils.py b/charmhelpers/contrib/openstack/utils.py index 61e7c76..4c13dde 100644 --- a/charmhelpers/contrib/openstack/utils.py +++ b/charmhelpers/contrib/openstack/utils.py @@ -409,16 +409,6 @@ def get_os_version_codename(codename, version_map=OPENSTACK_CODENAMES): error_out(e) -def get_os_version_codename_swift(codename): - '''Determine OpenStack version number of swift from codename.''' - for k, v in six.iteritems(SWIFT_CODENAMES): - if k == codename: - return v[-1] - e = 'Could not derive swift version for '\ - 'codename: %s' % codename - error_out(e) - - def get_swift_codename(version): '''Determine OpenStack codename that corresponds to swift version.''' codenames = [k for k, v in six.iteritems(SWIFT_CODENAMES) if version in v] @@ -843,14 +833,10 @@ def openstack_upgrade_available(package): if not cur_vers: # The package has not been installed yet do not attempt upgrade return False - if "swift" in package: - codename = get_os_codename_install_source(src) - avail_vers = get_os_version_codename_swift(codename) - else: - try: - avail_vers = get_os_version_install_source(src) - except Exception: - avail_vers = cur_vers + try: + avail_vers = get_os_version_install_source(src) + except Exception: + avail_vers = cur_vers apt.init() return apt.version_compare(avail_vers, cur_vers) >= 1 diff --git a/test-requirements.txt b/test-requirements.txt index cd25fb3..f9a7709 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -37,6 +37,10 @@ stevedore<1.31.0;python_version<'3.6' debtcollector<1.22.0;python_version<'3.6' oslo.utils<=3.41.0;python_version<'3.6' +# New openstacksdk versions depend on platformdirs>=3 which does not support +# python 3.6 +openstacksdk<1.6.0; python_version <= '3.6' + coverage>=4.5.2 pyudev # for ceph-* charm unit tests (need to fix the ceph-* charm unit tests/mocking) git+https://github.com/openstack-charmers/zaza.git@stable/xena#egg=zaza