X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Ftestapi%2Fopnfv_testapi%2Fcmd%2Fserver.py;h=545d5e367e0d341397b6ff5ae49312719d86caa9;hb=5b77ae789540f805199831427930476c9579916b;hp=fa2b722500a24f9367a1634b8534743be19730bb;hpb=32c30a6ce8c2f59d75f4c94fce9ed201437a554b;p=releng.git diff --git a/utils/test/testapi/opnfv_testapi/cmd/server.py b/utils/test/testapi/opnfv_testapi/cmd/server.py index fa2b72250..545d5e367 100644 --- a/utils/test/testapi/opnfv_testapi/cmd/server.py +++ b/utils/test/testapi/opnfv_testapi/cmd/server.py @@ -48,7 +48,9 @@ def parse_config(argv=[]): parser.add_argument("-c", "--config-file", dest='config_file', help="Config file location") args = parser.parse_args(argv) - CONF = config.APIConfig().parse(args.config_file) + if args.config_file: + config.Config.CONFIG = args.config_file + CONF = config.Config() def get_db(): @@ -56,12 +58,14 @@ def get_db(): def make_app(): - swagger.docs(base_url=CONF.swagger_base_url) + swagger.docs(base_url=CONF.swagger_base_url, + static_path=CONF.static_path) return swagger.Application( url_mappings.mappings, db=get_db(), - debug=CONF.api_debug_on, - auth=CONF.api_authenticate_on + debug=CONF.api_debug, + auth=CONF.api_authenticate, + cookie_secret='opnfv-testapi', )