Merge "Add LVM as default backend"
This commit is contained in:
commit
6c731ad9fe
@ -137,12 +137,12 @@ class StorageBackendContext(OSContextGenerator):
|
|||||||
backends.append('CEPH')
|
backends.append('CEPH')
|
||||||
if enable_lvm():
|
if enable_lvm():
|
||||||
backends.append('LVM')
|
backends.append('LVM')
|
||||||
if len(backends) > 0:
|
# Use the package default backend to stop the service flapping.
|
||||||
return {
|
if not backends:
|
||||||
'active_backends': backends,
|
backends = ['LVM']
|
||||||
'backends': ",".join(backends)}
|
return {
|
||||||
else:
|
'active_backends': backends,
|
||||||
return {}
|
'backends': ",".join(backends)}
|
||||||
|
|
||||||
|
|
||||||
class LoggingConfigContext(OSContextGenerator):
|
class LoggingConfigContext(OSContextGenerator):
|
||||||
|
@ -113,7 +113,9 @@ class TestCinderContext(CharmTestCase):
|
|||||||
self.config.return_value = None
|
self.config.return_value = None
|
||||||
self.relation_ids.return_value = []
|
self.relation_ids.return_value = []
|
||||||
self.os_release.return_value = 'havana'
|
self.os_release.return_value = 'havana'
|
||||||
self.assertEqual(contexts.StorageBackendContext()(), {})
|
self.assertEqual(
|
||||||
|
contexts.StorageBackendContext()(),
|
||||||
|
{'active_backends': ['LVM'], 'backends': 'LVM'})
|
||||||
|
|
||||||
def test_storage_backend_single_backend(self):
|
def test_storage_backend_single_backend(self):
|
||||||
rel_dict = {
|
rel_dict = {
|
||||||
|
Loading…
Reference in New Issue
Block a user