diff --git a/ceilometer/storage/__init__.py b/ceilometer/storage/__init__.py index 7dab32037..ca273f768 100644 --- a/ceilometer/storage/__init__.py +++ b/ceilometer/storage/__init__.py @@ -57,7 +57,8 @@ def register_opts(conf): def get_engine(conf): """Load the configured engine and return an instance.""" if conf.database_connection: - conf.database.connection = conf.database_connection + conf.set_override('connection', conf.database_connection, + group='database') engine_name = urlparse.urlparse(conf.database.connection).scheme LOG.debug('looking for %r driver in %r', engine_name, STORAGE_ENGINE_NAMESPACE) diff --git a/ceilometer/storage/impl_mongodb.py b/ceilometer/storage/impl_mongodb.py index 6767d507a..38f040dea 100644 --- a/ceilometer/storage/impl_mongodb.py +++ b/ceilometer/storage/impl_mongodb.py @@ -322,7 +322,6 @@ class Connection(base.Connection): # a new key '_id'). record = copy.copy(data) self.db.meter.insert(record) - return def get_users(self, source=None): """Return an iterable of user id strings. diff --git a/ceilometer/storage/impl_sqlalchemy.py b/ceilometer/storage/impl_sqlalchemy.py index 107e4fcd0..91c1e04c3 100644 --- a/ceilometer/storage/impl_sqlalchemy.py +++ b/ceilometer/storage/impl_sqlalchemy.py @@ -212,8 +212,6 @@ class Connection(base.Connection): meter.message_id = data['message_id'] session.flush() - return - def get_users(self, source=None): """Return an iterable of user id strings.