def test_volume_usage_audit_context(self, _open): self.config.return_value = 'month' ctxt = contexts.VolumeUsageAuditContext()() _open.assert_called_with( contexts.VolumeUsageAuditContext.DEFAULT_CRONTAB_PATH, "wt+") self.assertEqual(self.config.return_value, ctxt["volume_usage_audit_period"])
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(), 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'] }),