diff --git a/requirements.txt b/requirements.txt index 47c318983..3aa8c6bdf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,7 +28,7 @@ stevedore>=1.28.0 # Apache-2.0 voluptuous>=0.11.1 # BSD License SQLAlchemy>=1.2.5 # MIT sympy>=1.1.1 # BSD -pysnmp>=4.4.4 # BSD +pysnmp-lextudio>=5.0.0 # BSD PyJWT>=1.6.0 # MIT osprofiler>=2.0.0 # Apache-2.0 keystoneauth1>=3.6.2 # Apache-2.0 diff --git a/vitrage/storage/__init__.py b/vitrage/storage/__init__.py index 3bd9a5cd6..06a5b5bdc 100644 --- a/vitrage/storage/__init__.py +++ b/vitrage/storage/__init__.py @@ -15,6 +15,7 @@ from oslo_config import cfg from oslo_db.sqlalchemy import enginefacade from oslo_log import log +from sqlalchemy import text from stevedore import driver import tenacity import threading @@ -56,7 +57,7 @@ def get_connection_from_config(): """Return an open connection to the database.""" conn = mgr.driver(url) with enginefacade.reader.using(_CONTEXT) as session: - session.execute('SELECT 1;') + session.execute(text('SELECT 1;')) return conn return _get_connection()