if not service_enabled('api'): # drop requirement for identity interface _interfaces.pop('identity') 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(),
def ceph_config_file(): return CHARM_CEPH_CONF.format(service_name()) CONFIG_FILES = OrderedDict([ (GLANCE_REGISTRY_CONF, { 'hook_contexts': [ context.SharedDBContext(ssl_dir=GLANCE_CONF_DIR), context.IdentityServiceContext(service='glance', service_user='******'), context.SyslogContext(), glance_contexts.LoggingConfigContext(), glance_contexts.GlanceIPv6Context(), context.WorkerConfigContext(), context.OSConfigFlagContext(charm_flag='registry-config-flags', template_flag='registry_config_flags'), context.MemcacheContext() ], 'services': ['glance-registry'] }), (GLANCE_API_CONF, { 'hook_contexts': [ context.SharedDBContext(ssl_dir=GLANCE_CONF_DIR), context.AMQPContext(ssl_dir=GLANCE_CONF_DIR), context.IdentityServiceContext(service='glance', service_user='******'), glance_contexts.GlanceContext(), glance_contexts.CephGlanceContext(), glance_contexts.ObjectStoreContext(), glance_contexts.CinderStoreContext(), glance_contexts.HAProxyContext(),
[ _services.remove(service) for service in SERVICE_BLACKLIST[release] ] return _services BASE_RESOURCE_MAP = OrderedDict([ (NOVA_CONF, { 'services': resolve_services(), 'contexts': [ context.AMQPContext(ssl_dir=NOVA_CONF_DIR), context.SharedDBContext(relation_prefix='nova', ssl_dir=NOVA_CONF_DIR), context.OSConfigFlagContext(charm_flag='nova-alchemy-flags', template_flag='nova_alchemy_flags'), context.ImageServiceContext(), context.OSConfigFlagContext(), context.SubordinateConfigContext(interface='nova-vmware', service='nova', config_file=NOVA_CONF), nova_cc_context.NovaCellContext(), context.SyslogContext(), context.LogLevelContext(), nova_cc_context.HAProxyContext(), nova_cc_context.IdentityServiceContext(service='nova', service_user='******'), nova_cc_context.VolumeServiceContext(), context.ZeroMQContext(), context.NotificationDriverContext(), nova_cc_context.NovaIPv6Context(),