diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/conf.py | 2 | ||||
-rw-r--r-- | api/database/__init__.py | 4 | ||||
-rw-r--r-- | api/server.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/api/conf.py b/api/conf.py index abaf34a1f..a4f332533 100644 --- a/api/conf.py +++ b/api/conf.py @@ -15,8 +15,6 @@ with IPDB() as ip: GATEWAY_IP = ip.routes['default'].gateway PORT = 8086 -TEST_ACTION = ['runTestCase'] - TEST_CASE_PATH = '../tests/opnfv/test_cases/' SAMPLE_PATH = '../samples/' 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)) diff --git a/api/server.py b/api/server.py index 5bac1ba47..be7963481 100644 --- a/api/server.py +++ b/api/server.py @@ -52,7 +52,6 @@ def init_db(): Base.metadata.create_all(bind=engine) -init_db() reduce(lambda a, b: a.add_resource(b.resource, b.url, endpoint=b.endpoint) or a, urlpatterns, api) @@ -60,4 +59,5 @@ if __name__ == '__main__': _init_logging() logger.setLevel(logging.DEBUG) logger.info('Starting server') + init_db() app.run(host='0.0.0.0') |