sample: stop using global conf
Since the sample_source is just a default for the Sample constructor, their is no need to pass cfg.CONF everywhere in ceilometer just for this. Instead we prepare the defaults of the Sample class in prepare_service(). Change-Id: Ie94ec4fece117341569d327fbe8eaaa2fb74b5f6
This commit is contained in:
@@ -25,6 +25,7 @@ from oslo_reports import guru_meditation_report as gmr
|
||||
from ceilometer.conf import defaults
|
||||
from ceilometer import keystone_client
|
||||
from ceilometer import messaging
|
||||
from ceilometer import sample
|
||||
from ceilometer import version
|
||||
|
||||
OPTS = [
|
||||
@@ -86,6 +87,8 @@ def prepare_service(argv=None, config_files=None, conf=None):
|
||||
ka_loading.load_auth_from_conf_options(conf, "service_credentials")
|
||||
|
||||
log.setup(conf, 'ceilometer')
|
||||
sample.setup(conf)
|
||||
|
||||
# NOTE(liusheng): guru cannot run with service under apache daemon, so when
|
||||
# ceilometer-api running with mod_wsgi, the argv is [], we don't start
|
||||
# guru.
|
||||
|
||||
Reference in New Issue
Block a user