Comment 1 for bug 1741628

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

This is quite interesting to solve. Obviously, the selecting a release is concretely "selecting a class implementation" so we don't know which class is the one we want!

The 'release_pkg' class property appeared after the 'selecting a release' functionality was implemented, which is why it doesn't know/use it.

One thing we could do is to look at all of the concrete classes that have registered themselves (by virtue of inheriting from BaseOpenStackCharm or friends). We could work through these in release order, see if 'release_pkg' exists, determine if the package is actually available, as it might have 'gone' in a later release, and then determine the release.

We could do this optionally if the 'python-keystonemiddleware' package doesn't exist.

It would probably need to be abstracted in some way because we have to support both packages and snaps.

Thoughts?