Use new sort method _sort_releases to support wrapped release names

Earlier trilio module was using sorted method to sort supported openstack releases,
but this method was causing issue for zed and yoga release and was considering antelope only.
With this change we are going to use the new method from core module _sort_releases which correctly handles
the situation.

Change-Id: I340d3b646d2472e751d01e2bf786ada7b19cbd3d
This commit is contained in:
shyam-biradar 2024-04-26 08:52:12 +00:00
parent 760f1257ef
commit 5f56d45215

View File

@ -25,7 +25,7 @@ import charmhelpers.core as ch_core
import charmhelpers.fetch as fetch
import charmhelpers.core.unitdata as unitdata
import charmhelpers.contrib.openstack.utils as os_utils
from charms_openstack.charm import core as cho_core
import charms.reactive as reactive
@ -222,7 +222,7 @@ def make_trilio_get_charm_instance_handler():
:rtype: BaseOpenStackCharm() derived class according to cls.releases
"""
cls = None
known_os_releases = sorted(_trilio_releases.keys())
known_os_releases = cho_core._sort_releases(_trilio_releases.keys())
if release is None:
# If release is None then select the class(es) which supports the
# most recent OpenStack release, from within this set select the