Sync charm-helpers
Change-Id: I9fe59f5c83f7da3f7f7a9f3b53a09933dce22be2
This commit is contained in:
parent
454aa25c6c
commit
95898396ba
@ -126,7 +126,7 @@ class CheckException(Exception):
|
||||
|
||||
|
||||
class Check(object):
|
||||
shortname_re = '[A-Za-z0-9-_.]+$'
|
||||
shortname_re = '[A-Za-z0-9-_.@]+$'
|
||||
service_template = ("""
|
||||
#---------------------------------------------------
|
||||
# This file is Juju managed
|
||||
|
@ -97,6 +97,7 @@ from charmhelpers.contrib.network.ip import (
|
||||
)
|
||||
from charmhelpers.contrib.openstack.utils import (
|
||||
config_flags_parser,
|
||||
get_os_codename_install_source,
|
||||
enable_memcache,
|
||||
CompareOpenStackReleases,
|
||||
os_release,
|
||||
@ -240,6 +241,8 @@ class SharedDBContext(OSContextGenerator):
|
||||
else:
|
||||
rids = relation_ids(self.interfaces[0])
|
||||
|
||||
rel = (get_os_codename_install_source(config('openstack-origin')) or
|
||||
'icehouse')
|
||||
for rid in rids:
|
||||
self.related = True
|
||||
for unit in related_units(rid):
|
||||
@ -253,6 +256,8 @@ class SharedDBContext(OSContextGenerator):
|
||||
'database_password': rdata.get(password_setting),
|
||||
'database_type': 'mysql+pymysql'
|
||||
}
|
||||
if CompareOpenStackReleases(rel) < 'stein':
|
||||
ctxt['database_type'] = 'mysql'
|
||||
if self.context_complete(ctxt):
|
||||
db_ssl(rdata, ctxt, self.ssl_dir)
|
||||
return ctxt
|
||||
|
Loading…
x
Reference in New Issue
Block a user