Enable swift payload upgrades for wallaby+

Sync charm-helpers to pick up fix for openstack_upgrade_available
that enables successful payload upgrades. This will need backporting
to stable/wallaby.

The openstacksdk version is pinned in test-requirements.txt to enabled
py36 unit tests to run successfully.

https://github.com/juju/charm-helpers/pull/871
Closes-Bug: #2040606
Change-Id: I1c6a8adaf61f927239aeecbcd7cde28e47885b20
This commit is contained in:
Corey Bryant 2023-10-30 12:49:48 -04:00
parent df69671544
commit 9c6587cc77
2 changed files with 8 additions and 18 deletions

View File

@ -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,10 +833,6 @@ 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:

View File

@ -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/wallaby#egg=zaza