예제 #1
0
 def test_lvm_context_enabled(self, enable_lvm):
     enable_lvm.return_value = True
     self.config.return_value = 'cinder-vol1'
     ctxt = contexts.LVMContext()()
     expect = {
         'volume_backend_name': 'LVM',
         'volume_driver': 'cinder.volume.drivers.lvm.LVMVolumeDriver',
         'volume_group': 'cinder-vol1',
         'volume_name_template': 'volume-%s',
         'volumes_dir': '/var/lib/cinder/volumes'}
     self.assertEqual(ctxt, expect)
예제 #2
0
         cinder_contexts.CinderSubordinateConfigContext(
             interface=['storage-backend', 'backup-backend'],
             service='cinder',
             config_file=CINDER_CONF),
         cinder_contexts.StorageBackendContext(),
         cinder_contexts.LoggingConfigContext(),
         context.IdentityServiceContext(service='cinder',
                                        service_user='******'),
         context.BindHostContext(),
         context.WorkerConfigContext(),
         cinder_contexts.RegionContext(),
         context.InternalEndpointContext(),
         cinder_contexts.VolumeUsageAuditContext(),
         context.MemcacheContext(),
         cinder_contexts.SectionalConfigContext(),
         cinder_contexts.LVMContext()
     ],
     'services':
     ['cinder-api', 'cinder-volume', 'cinder-scheduler', 'haproxy']
 }),
 (CINDER_API_CONF, {
     'contexts': [context.IdentityServiceContext()],
     'services': ['cinder-api'],
 }),
 (CINDER_POLICY_JSON, {
     'contexts': [],
     'services': ['cinder-api']
 }),
 (ceph_config_file(), {
     'contexts': [context.CephContext()],
     'services': ['cinder-volume']
예제 #3
0
 def test_lvm_context_disabled(self, enable_lvm):
     enable_lvm.return_value = False
     ctxt = contexts.LVMContext()()
     self.assertEqual(ctxt, {})