Add version map support

Add versions for >= mitaka; use barbican-common as release package.

Change-Id: Ibdb01774f160abb77ac15e95755107e6ed4042c2
This commit is contained in:
James Page 2017-05-26 09:18:05 +01:00
parent 88c1d23462
commit a26561f6ea
1 changed files with 16 additions and 0 deletions

View File

@ -17,6 +17,7 @@
# needed on the class. # needed on the class.
from __future__ import absolute_import from __future__ import absolute_import
import collections
import subprocess import subprocess
import charmhelpers.core.hookenv as hookenv import charmhelpers.core.hookenv as hookenv
@ -141,6 +142,21 @@ class BarbicanCharm(charms_openstack.charm.HAOpenStackCharm):
ha_resources = ['vips', 'haproxy'] ha_resources = ['vips', 'haproxy']
# Package for release version detection
release_pkg = 'barbican-common'
# Package codename map for barbican-common
package_codenames = {
'barbican-common': collections.OrderedDict([
('2', 'mitaka'),
('3', 'newton'),
('4', 'ocata'),
('5', 'pike'),
('6', 'queens'),
('7', 'rocky'),
]),
}
def get_amqp_credentials(self): def get_amqp_credentials(self):
"""Provide the default amqp username and vhost as a tuple. """Provide the default amqp username and vhost as a tuple.