Sync charm-helpers for Rocky series support
Change-Id: I37bbac627ebfa363e231773400fe3a805572bf03
This commit is contained in:
parent
2a7749333c
commit
047e550250
@ -291,6 +291,8 @@ class OpenStackAmuletDeployment(AmuletDeployment):
|
||||
('zesty', None): self.zesty_ocata,
|
||||
('artful', None): self.artful_pike,
|
||||
('bionic', None): self.bionic_queens,
|
||||
('bionic', 'cloud:bionic-rocky'): self.bionic_rocky,
|
||||
('cosmic', None): self.cosmic_rocky,
|
||||
}
|
||||
return releases[(self.series, self.openstack)]
|
||||
|
||||
@ -306,6 +308,7 @@ class OpenStackAmuletDeployment(AmuletDeployment):
|
||||
('zesty', 'ocata'),
|
||||
('artful', 'pike'),
|
||||
('bionic', 'queens'),
|
||||
('cosmic', 'rocky'),
|
||||
])
|
||||
if self.openstack:
|
||||
os_origin = self.openstack.split(':')[1]
|
||||
|
@ -56,7 +56,7 @@ OPENSTACK_RELEASES_PAIRS = [
|
||||
'trusty_mitaka', 'xenial_mitaka', 'xenial_newton',
|
||||
'yakkety_newton', 'xenial_ocata', 'zesty_ocata',
|
||||
'xenial_pike', 'artful_pike', 'xenial_queens',
|
||||
'bionic_queens']
|
||||
'bionic_queens', 'bionic_rocky', 'cosmic_rocky']
|
||||
|
||||
|
||||
class OpenStackAmuletUtils(AmuletUtils):
|
||||
|
@ -190,8 +190,8 @@ class OSContextGenerator(object):
|
||||
class SharedDBContext(OSContextGenerator):
|
||||
interfaces = ['shared-db']
|
||||
|
||||
def __init__(self,
|
||||
database=None, user=None, relation_prefix=None, ssl_dir=None):
|
||||
def __init__(self, database=None, user=None, relation_prefix=None,
|
||||
ssl_dir=None, relation_id=None):
|
||||
"""Allows inspecting relation for settings prefixed with
|
||||
relation_prefix. This is useful for parsing access for multiple
|
||||
databases returned via the shared-db interface (eg, nova_password,
|
||||
@ -202,6 +202,7 @@ class SharedDBContext(OSContextGenerator):
|
||||
self.user = user
|
||||
self.ssl_dir = ssl_dir
|
||||
self.rel_name = self.interfaces[0]
|
||||
self.relation_id = relation_id
|
||||
|
||||
def __call__(self):
|
||||
self.database = self.database or config('database')
|
||||
@ -235,7 +236,12 @@ class SharedDBContext(OSContextGenerator):
|
||||
if self.relation_prefix:
|
||||
password_setting = self.relation_prefix + '_password'
|
||||
|
||||
for rid in relation_ids(self.interfaces[0]):
|
||||
if self.relation_id:
|
||||
rids = [self.relation_id]
|
||||
else:
|
||||
rids = relation_ids(self.interfaces[0])
|
||||
|
||||
for rid in rids:
|
||||
self.related = True
|
||||
for unit in related_units(rid):
|
||||
rdata = relation_get(rid=rid, unit=unit)
|
||||
@ -448,11 +454,13 @@ class IdentityCredentialsContext(IdentityServiceContext):
|
||||
|
||||
class AMQPContext(OSContextGenerator):
|
||||
|
||||
def __init__(self, ssl_dir=None, rel_name='amqp', relation_prefix=None):
|
||||
def __init__(self, ssl_dir=None, rel_name='amqp', relation_prefix=None,
|
||||
relation_id=None):
|
||||
self.ssl_dir = ssl_dir
|
||||
self.rel_name = rel_name
|
||||
self.relation_prefix = relation_prefix
|
||||
self.interfaces = [rel_name]
|
||||
self.relation_id = relation_id
|
||||
|
||||
def __call__(self):
|
||||
log('Generating template context for amqp', level=DEBUG)
|
||||
@ -473,7 +481,11 @@ class AMQPContext(OSContextGenerator):
|
||||
raise OSContextError
|
||||
|
||||
ctxt = {}
|
||||
for rid in relation_ids(self.rel_name):
|
||||
if self.relation_id:
|
||||
rids = [self.relation_id]
|
||||
else:
|
||||
rids = relation_ids(self.rel_name)
|
||||
for rid in rids:
|
||||
ha_vip_only = False
|
||||
self.related = True
|
||||
transport_hosts = None
|
||||
|
@ -133,6 +133,7 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([
|
||||
('zesty', 'ocata'),
|
||||
('artful', 'pike'),
|
||||
('bionic', 'queens'),
|
||||
('cosmic', 'rocky'),
|
||||
])
|
||||
|
||||
|
||||
@ -151,6 +152,7 @@ OPENSTACK_CODENAMES = OrderedDict([
|
||||
('2017.1', 'ocata'),
|
||||
('2017.2', 'pike'),
|
||||
('2018.1', 'queens'),
|
||||
('2018.2', 'rocky'),
|
||||
])
|
||||
|
||||
# The ugly duckling - must list releases oldest to newest
|
||||
@ -183,6 +185,8 @@ SWIFT_CODENAMES = OrderedDict([
|
||||
['2.13.0', '2.15.0']),
|
||||
('queens',
|
||||
['2.16.0', '2.17.0']),
|
||||
('rocky',
|
||||
['2.18.0']),
|
||||
])
|
||||
|
||||
# >= Liberty version->codename mapping
|
||||
|
@ -158,6 +158,14 @@ CLOUD_ARCHIVE_POCKETS = {
|
||||
'queens/proposed': 'xenial-proposed/queens',
|
||||
'xenial-queens/proposed': 'xenial-proposed/queens',
|
||||
'xenial-proposed/queens': 'xenial-proposed/queens',
|
||||
# Rocky
|
||||
'rocky': 'bionic-updates/rocky',
|
||||
'bionic-rocky': 'bionic-updates/rocky',
|
||||
'bionic-rocky/updates': 'bionic-updates/rocky',
|
||||
'bionic-updates/rocky': 'bionic-updates/rocky',
|
||||
'rocky/proposed': 'bionic-proposed/rocky',
|
||||
'bionic-rocky/proposed': 'bionic-proposed/rocky',
|
||||
'bionic-proposed/rocky': 'bionic-proposed/rocky',
|
||||
}
|
||||
|
||||
|
||||
|
@ -291,6 +291,8 @@ class OpenStackAmuletDeployment(AmuletDeployment):
|
||||
('zesty', None): self.zesty_ocata,
|
||||
('artful', None): self.artful_pike,
|
||||
('bionic', None): self.bionic_queens,
|
||||
('bionic', 'cloud:bionic-rocky'): self.bionic_rocky,
|
||||
('cosmic', None): self.cosmic_rocky,
|
||||
}
|
||||
return releases[(self.series, self.openstack)]
|
||||
|
||||
@ -306,6 +308,7 @@ class OpenStackAmuletDeployment(AmuletDeployment):
|
||||
('zesty', 'ocata'),
|
||||
('artful', 'pike'),
|
||||
('bionic', 'queens'),
|
||||
('cosmic', 'rocky'),
|
||||
])
|
||||
if self.openstack:
|
||||
os_origin = self.openstack.split(':')[1]
|
||||
|
@ -56,7 +56,7 @@ OPENSTACK_RELEASES_PAIRS = [
|
||||
'trusty_mitaka', 'xenial_mitaka', 'xenial_newton',
|
||||
'yakkety_newton', 'xenial_ocata', 'zesty_ocata',
|
||||
'xenial_pike', 'artful_pike', 'xenial_queens',
|
||||
'bionic_queens']
|
||||
'bionic_queens', 'bionic_rocky', 'cosmic_rocky']
|
||||
|
||||
|
||||
class OpenStackAmuletUtils(AmuletUtils):
|
||||
|
@ -133,6 +133,7 @@ UBUNTU_OPENSTACK_RELEASE = OrderedDict([
|
||||
('zesty', 'ocata'),
|
||||
('artful', 'pike'),
|
||||
('bionic', 'queens'),
|
||||
('cosmic', 'rocky'),
|
||||
])
|
||||
|
||||
|
||||
@ -151,6 +152,7 @@ OPENSTACK_CODENAMES = OrderedDict([
|
||||
('2017.1', 'ocata'),
|
||||
('2017.2', 'pike'),
|
||||
('2018.1', 'queens'),
|
||||
('2018.2', 'rocky'),
|
||||
])
|
||||
|
||||
# The ugly duckling - must list releases oldest to newest
|
||||
@ -183,6 +185,8 @@ SWIFT_CODENAMES = OrderedDict([
|
||||
['2.13.0', '2.15.0']),
|
||||
('queens',
|
||||
['2.16.0', '2.17.0']),
|
||||
('rocky',
|
||||
['2.18.0']),
|
||||
])
|
||||
|
||||
# >= Liberty version->codename mapping
|
||||
|
@ -158,6 +158,14 @@ CLOUD_ARCHIVE_POCKETS = {
|
||||
'queens/proposed': 'xenial-proposed/queens',
|
||||
'xenial-queens/proposed': 'xenial-proposed/queens',
|
||||
'xenial-proposed/queens': 'xenial-proposed/queens',
|
||||
# Rocky
|
||||
'rocky': 'bionic-updates/rocky',
|
||||
'bionic-rocky': 'bionic-updates/rocky',
|
||||
'bionic-rocky/updates': 'bionic-updates/rocky',
|
||||
'bionic-updates/rocky': 'bionic-updates/rocky',
|
||||
'rocky/proposed': 'bionic-proposed/rocky',
|
||||
'bionic-rocky/proposed': 'bionic-proposed/rocky',
|
||||
'bionic-proposed/rocky': 'bionic-proposed/rocky',
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user