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(), context.SyslogContext(), glance_contexts.LoggingConfigContext(), glance_contexts.GlanceIPv6Context(), context.WorkerConfigContext(), glance_contexts.MultiStoreContext(), context.OSConfigFlagContext(charm_flag='api-config-flags', template_flag='api_config_flags'), context.InternalEndpointContext('glance-common'), context.SubordinateConfigContext(interface=['storage-backend'], service=['glance-api'], config_file=GLANCE_API_CONF), context.MemcacheContext() ], 'services': ['glance-api']
def test_cinder_related(self): self.relation_ids.return_value = ['cinder-volume-service:0'] self.assertEqual(contexts.CinderStoreContext()(), {'cinder_store': True})
def test_cinder_related_via_subordinate(self): self.relation_ids.return_value = ['cinder-backend:0'] self.assertEqual(contexts.CinderStoreContext()(), {'cinder_store': True})
def test_cinder_not_related(self): self.relation_ids.return_value = [] self.assertEqual(contexts.CinderStoreContext()(), {})