summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/common/config.py
AgeCommit message (Collapse)AuthorFilesLines
2017-10-27bugfix: E722 do not use bare exceptSerenaFeng1-1/+1
new added pep8 check: https://build.opnfv.org/ci/job/testapi-verify-master/435/console Change-Id: I29c1ffbb534babf55ec2fe675001cc85b9e2e922 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-05Merge "bugfix: leverage data_files to stop hacking setup.py"Serena Feng1-4/+0
2017-09-05bugfix: container start failed due to config_file set to NonetypeSerenaFeng1-1/+1
Traceback (most recent call last): File "/usr/local/bin/opnfv-testapi", line 6, in <module> from opnfv_testapi.cmd.server import main File "/usr/local/lib/python2.7/dist-packages/opnfv_testapi/cmd/server.py", line 34, in <module> from opnfv_testapi.common.config import CONF File "/usr/local/lib/python2.7/dist-packages/opnfv_testapi/common/config.py", line 67, in <module> CONF = Config() File "/usr/local/lib/python2.7/dist-packages/opnfv_testapi/common/config.py", line 21, in __init__ self._parse() File "/usr/local/lib/python2.7/dist-packages/opnfv_testapi/common/config.py", line 29, in _parse if not os.path.exists(self.config_file): File "/usr/lib/python2.7/genericpath.py", line 18, in exists os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found Change-Id: Ifa26b5b52e7f1c19a773b02ecc1c45b59b5dc09b Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-04bugfix: leverage data_files to stop hacking setup.pySerenaFeng1-4/+0
1) leverage data_files to distribute ui related files, and dispatch them under /usr/local/share/opnfv_testapi 2) delete hacking coding, no more extra processes 3) utilize MANIFEST.in to include 3rd_party when producing a source distribution Change-Id: Idb83a02be11f6b24610191e9f85e0db80d92e972 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-04improve: discard venv support for official productSerenaFeng1-13/+2
virtual env is only to facilitate the development, not be used in official product, thus delete the support, let the developer manage their own development env. Change-Id: I33af882ab257e88b1e7a316d1d78197d6279933d Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-20decouple the mutual-dependence of config.py and server.pySerenaFeng1-9/+27
Currently server.py relies on CONF while starting the service, and config.py's config_fie is set in server.py, which is wrongly bi-depended this patch aims to let Config parse the sys.argv personally, just as oslo.config do, so that decouple the mutual-dependency Change-Id: I46887d122a98d478caebe9eeb7ab038941ce1f6b Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-06-20support pagination in TestAPISerenaFeng1-0/+5
In this patch, pagination is supported, so you can go through results leveraging: http://testresults.opnfv.org/test/api/v1/results?page=2 Change-Id: Ibe31c787643f27dbb06c4899e713b3c8e716e784 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-17refactor static_path to accomodate web portalSerenaFeng1-0/+4
move tornado_swagger/static to opnfv_testapi/static move swagger related 3rd libs to 3rd_party/swagger Change-Id: I32bba10584c99d13687b93f32577e37581db0c63 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-05-12refactor config parser to facilitate adding new configsSerenaFeng1-71/+29
refactor hardcoded config.py to facilitate adding new configurations come along with web portal and Authentication features Change-Id: Ibc16166ade0d6e730bb4c9d81e9b9bc9b297faa1 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-23start TestAPI in venv with no config-fileSerenaFeng1-2/+7
in virtual env mode, config.ini is configured in .venv/etc/opnfv_testapi, in this case when we start it the configuration file needs to be specified, by changing the _default_config, the -config-file is no longer needed when starting TestAPI in venv mode. Change-Id: I0217cfefe578bbc3325bb7577ed268dc21cde4ea Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-27Use new-style classes which inherit from object in TestAPISerenaFeng1-1/+1
JIRA: FUNCTEST-707 Change-Id: I90a3d6ebfdf798eefccb8e5a0deebb661329d903 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-24add unittest of config.pySerenaFeng1-17/+7
Change-Id: I96639c47d27ef449d02528efad23e2499daa3def Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-21Add token based authentication for post/update/deleterohitsakala1-0/+5
As the mongodb database is not so secure today, this has been added. The token is stored in the mongoDB database. For now, authenticate variable is set false so that there would be no problem in accessing the databse by jenkins jobs. JIRA: FUNCTEST-730 Change-Id: I12b3907d650fc63efbdb031ebf3dd09519750109 Signed-off-by: rohitsakala <rohitsakala@gmail.com>
2017-02-21fix violation of import rule in TestAPISerenaFeng1-5/+3
TestAPI violate import rule of OpenStack Style a lot, like Do not import objects, only modules Do not import more than one module per line Alphabetically order your imports by the full module path This patch is mean to fix them. Change-Id: Ia05b944a74b3f443c9101a9840f613f9a6f5ae49 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-10-18rename result_collection_api to testapiSerenaFeng1-0/+95
Change-Id: Iec4e3db23cd44f30831e17c127eda74e9d9b5d14 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>