Ejemplo n.º 1
0
 def test_glance_related_api_v2(self):
     self.relation_ids.return_value = ['image-service:0']
     self.config.return_value = '2'
     self.assertEqual(contexts.ImageServiceContext()(),
                      {'glance_api_version': '2'})
Ejemplo n.º 2
0
    return _interfaces


# Map config files to hook contexts and services that will be associated
# with file in restart_on_changes()'s service map.
BASE_RESOURCE_MAP = OrderedDict([
    (CINDER_CONF, {
        'contexts': [
            context.SharedDBContext(ssl_dir=CINDER_CONF_DIR),
            context.AMQPContext(ssl_dir=CINDER_CONF_DIR),
            context.ImageServiceContext(),
            context.OSConfigFlagContext(),
            context.SyslogContext(),
            cinder_contexts.CephContext(),
            cinder_contexts.HAProxyContext(),
            cinder_contexts.ImageServiceContext(),
            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(),
Ejemplo n.º 3
0
 def test_glance_not_related(self):
     self.relation_ids.return_value = []
     self.assertEqual(contexts.ImageServiceContext()(), {})