bug in adding cinder context
This commit is contained in:
@@ -41,8 +41,7 @@ class CephContext(OSContextGenerator):
|
||||
# ensure_ceph_pool() creates pool based on service name.
|
||||
'rbd_pool': service,
|
||||
'rbd_user': service,
|
||||
'host': service,
|
||||
'use_syslog': config('use-syslog')
|
||||
'host': service
|
||||
}
|
||||
|
||||
|
||||
@@ -76,3 +75,11 @@ class ApacheSSLContext(SSLContext):
|
||||
if not service_enabled('cinder-api'):
|
||||
return {}
|
||||
return super(ApacheSSLContext, self).__call__()
|
||||
|
||||
|
||||
class CinderContext(OSContextGenerator):
|
||||
def __call__(self):
|
||||
ctxt = {
|
||||
'use_syslog': config('use-syslog')
|
||||
}
|
||||
return ctxt
|
||||
|
||||
@@ -103,7 +103,8 @@ CONFIG_FILES = OrderedDict([
|
||||
context.OSConfigFlagContext(),
|
||||
cinder_contexts.CephContext(),
|
||||
cinder_contexts.HAProxyContext(),
|
||||
cinder_contexts.ImageServiceContext()],
|
||||
cinder_contexts.ImageServiceContext(),
|
||||
cinder_contexts.CinderContext()],
|
||||
'services': ['cinder-api', 'cinder-volume',
|
||||
'cinder-scheduler', 'haproxy']
|
||||
}),
|
||||
|
||||
@@ -43,14 +43,12 @@ class TestCinderContext(CharmTestCase):
|
||||
self.relation_ids.return_value = ['ceph:0']
|
||||
service = 'mycinder'
|
||||
self.service_name.return_value = service
|
||||
self.config.return_value = False
|
||||
self.assertEquals(
|
||||
contexts.CephContext()(),
|
||||
{'volume_driver': 'cinder.volume.driver.RBDDriver',
|
||||
'rbd_pool': service,
|
||||
'rbd_user': service,
|
||||
'host': service,
|
||||
'use_syslog': False})
|
||||
'host': service})
|
||||
|
||||
def test_haproxy_configuration(self):
|
||||
self.determine_haproxy_port.return_value = 8080
|
||||
|
||||
Reference in New Issue
Block a user