From 0bf28bec6097d128aa439b288b249fafcac7dbc0 Mon Sep 17 00:00:00 2001 From: Michael H Wilson Date: Tue, 16 Oct 2012 15:47:52 -0600 Subject: Fix hardcoded topic strings with constants. Replace hardcoded topic strings like 'volume' or 'compute' with config constants like FLAGS.volume_topic, etc. See bug #1057831 and bug #1061628. Change-Id: I817ecc3cbe3245b51a0c047be58d17edfec8a838 --- nova/api/openstack/compute/contrib/instance_usage_audit_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/contrib/instance_usage_audit_log.py b/nova/api/openstack/compute/contrib/instance_usage_audit_log.py index 1331c0a93..4547bbd01 100644 --- a/nova/api/openstack/compute/contrib/instance_usage_audit_log.py +++ b/nova/api/openstack/compute/contrib/instance_usage_audit_log.py @@ -82,7 +82,7 @@ class InstanceUsageAuditLogController(object): # We do this this way to include disabled compute services, # which can have instances on them. (mdragon) services = [svc for svc in db.service_get_all(context) - if svc['topic'] == 'compute'] + if svc['topic'] == FLAGS.compute_topic] hosts = set(serv['host'] for serv in services) seen_hosts = set() done_hosts = set() -- cgit