Add version -> codename map
Add support for package version to codename mapping to main Charm class, using the 'manila-common' package as the keystone package for version checking. Change-Id: I4ac3656d73ace24cc3c05681cc42bf4f24278585
This commit is contained in:
parent
f17ed3d4bb
commit
ac91f03e14
|
@ -17,6 +17,7 @@
|
|||
# needed on the class.
|
||||
from __future__ import absolute_import
|
||||
|
||||
import collections
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
|
@ -146,6 +147,21 @@ class ManilaCharm(charms_openstack.charm.HAOpenStackCharm):
|
|||
# This is the command to sync the database
|
||||
sync_cmd = ['sudo', 'manila-manage', 'db', 'sync']
|
||||
|
||||
# Package for release version detection
|
||||
release_pkg = 'manila-common'
|
||||
|
||||
# Package codename map for manila-common
|
||||
package_codenames = {
|
||||
'manila-common': collections.OrderedDict([
|
||||
('2', 'mitaka'),
|
||||
('3', 'newton'),
|
||||
('4', 'ocata'),
|
||||
('5', 'pike'),
|
||||
('6', 'queens'),
|
||||
('7', 'rocky'),
|
||||
]),
|
||||
}
|
||||
|
||||
# ha_resources = ['vips', 'haproxy']
|
||||
|
||||
# Custom charm configuration
|
||||
|
|
Loading…
Reference in New Issue