Merge "don't pass aodh options to oslo.db engine facade"
This commit is contained in:
commit
bed0fc04f7
@ -26,6 +26,7 @@ import six
|
||||
from sqlalchemy import desc
|
||||
|
||||
from aodh.i18n import _LI
|
||||
from aodh import storage
|
||||
from aodh.storage import base
|
||||
from aodh.storage import models as alarm_api_models
|
||||
from aodh.storage.sqlalchemy import models
|
||||
@ -62,8 +63,11 @@ class Connection(base.Connection):
|
||||
# in storage.__init__.get_connection_from_config function
|
||||
options = dict(conf.database.items())
|
||||
options['max_retries'] = 0
|
||||
self.conf = conf
|
||||
# oslo.db doesn't support options defined by Aodh
|
||||
for opt in storage.OPTS:
|
||||
options.pop(opt.name, None)
|
||||
self._engine_facade = db_session.EngineFacade(url, **options)
|
||||
self.conf = conf
|
||||
|
||||
def disconnect(self):
|
||||
self._engine_facade.get_engine().dispose()
|
||||
|
Loading…
x
Reference in New Issue
Block a user