aboutsummaryrefslogtreecommitdiffstats
path: root/api/database
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-01-19 07:02:38 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-19 07:02:38 +0000
commitcd36791a022aefc54eb258d62037274f7065a399 (patch)
treea8d67b03a8b776217d9027f66124dfdfaccba7fd /api/database
parentea706beda50f87ae37799bd8f0313d177909a4ff (diff)
parent483e2fcf41adcdddad5543c04d3ad42c60def334 (diff)
Merge "Add unittest framework for Yardstick API"
Diffstat (limited to 'api/database')
-rw-r--r--api/database/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/api/database/__init__.py b/api/database/__init__.py
index d7cf4f9c4..753b34684 100644
--- a/api/database/__init__.py
+++ b/api/database/__init__.py
@@ -13,10 +13,12 @@ from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
+from yardstick.common import constants as consts
+
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
-engine = create_engine('sqlite:////tmp/yardstick.db', convert_unicode=True)
+engine = create_engine(consts.SQLITE, convert_unicode=True)
db_session = scoped_session(sessionmaker(autocommit=False,
autoflush=False,
bind=engine))