summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi
AgeCommit message (Collapse)AuthorFilesLines
2017-09-06update Readme.rst to be consistent with current implementationSerenaFeng1-36/+65
Change-Id: Ie8abeca5901cce635f54f0c01496a7181287d0cd Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-05Merge "Refactored docker watchdog code"Morgan Richomme1-38/+25
2017-09-05Merge "hide create_pod function from anonymous user"Serena Feng2-7/+8
2017-09-05bugfix: TestAPI start failed due to config.ini not foundSerenaFeng2-2/+2
not specifying abspath, so that the config.ini is installed under /usr/local/etc/opnfv_testapi/config.ini Change-Id: If9f4d1ab2d6a67a4aa5b5d481f46e9eddb4a2cbb Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-05Merge "bugfix: leverage data_files to stop hacking setup.py"Serena Feng8-27/+11
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-05Merge "improve: discard venv support for official product"Serena Feng1-13/+2
2017-09-04Refactored docker watchdog codeSakala Venkata Krishna Rohit1-38/+25
Removed start_containers fix as it was redundant. Checking jenkins job status for each module separately as deployment of one module doesn't depend on other module. Change-Id: I8ce34b9b7458ac56c9b866b5add539ad304095ed Signed-off-by: Sakala Venkata Krishna Rohit <rohitsakala@gmail.com>
2017-09-04bugfix: leverage data_files to stop hacking setup.pySerenaFeng8-27/+11
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-04hide create_pod function from anonymous userSerenaFeng2-7/+8
Querying pods is open to everybody But only login users are allowed to create the new pod Change-Id: I1c722580c2c51a8a8b0f84f1ffac451dff20b086 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-09-04clarify obsoleted test configuration filesSerenaFeng7-83/+3
delete noparam.ini/nosection.ini/notboolean.ini/notint.ini/normal.ini substitute normal.ini with etc/config.ini Change-Id: I7e2fa331736a2f9bf807814416a3118be5f613e5 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-04Merge "leverage LFID as Authentication"Serena Feng14-204/+104
2017-09-01Merge "Add watchdog into testresults server to restart docker containers."Aric Gardner1-0/+178
2017-08-31leverage LFID as AuthenticationSerenaFeng14-204/+104
delete openid authentication add LFID authentication Change-Id: Iead144b5130bce51448024e65092fdea3bb2f07a Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-30Added the validation for name field in create pod functionthuva42-16/+21
Change-Id: I18a072c7b2677794a64693135904cf97eb7b3349 Signed-off-by: thuva4 <tharma.thuva@gmail.com>
2017-08-29Add watchdog into testresults server to restart docker containers.Sakala Venkata Krishna Rohit1-0/+178
Unexpected crashing of docker containers were occuring. So, a cron script is to be run in regular intervals which will check for status of the deployments and restart docker if necessary. Docker restart is seen as a solution to solve majority of crashes. Suggest if there is a better approach. Change-Id: I40d56180350844b4a0f766e1b10a9fabfa02d3be Signed-off-by: Sakala Venkata Krishna Rohit <rohitsakala@gmail.com>
2017-08-29Merge "leverage setup.py directly to install TestAPI"Serena Feng4-32/+12
2017-08-25leverage setup.py directly to install TestAPISerenaFeng4-32/+12
1. delete additional script install.sh 2. using 'python setup.py install' directly to install TestAPI, as traditional python project do Change-Id: Ifcdee7b2bae2553f523a722bff794c40d20f81cc Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-25update scenario nameSerenaFeng3-1/+37
url PUT /api/v1/scenarios/<scenario_name> if new_name already exist, return Forbidden if new_name == name, return Forbidden Change-Id: If3b82b3df4a763d60dad110caca2659c5f39ab50 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-25update installer under scenarioSerenaFeng3-9/+132
1. post, add one or more new installers 2. update, replace existed installers as a totality 3. delete, delete one or more installers by name 4. in post&update, if schema is not consistent with ScenarioInstaller model, BadRequest will be raised(only extra keys will be detected currently) 5. in post, if installer already exist, return Conflict with already exist message 6. in update, if a installer appears more than once, also return Conflict with already exist message Change-Id: I830dba3bcf5f1a9d1c93513b4aae59009f69dc8f Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-25simplify unit tests implementation of update scenarioSerenaFeng1-88/+79
1. delete useless input arguments 2. update on and assert with self.req_d directly delete intermediate variable 'scenario' Change-Id: I3eda1df4893c890bb23ccf05b45ce2de5fa9dd93 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-25update versions under scenarioSerenaFeng4-34/+190
1. post, add one or more new versions 2. update, replace existed version as a totality 3. delete, delete one or more versions by name 4. in post&update, if schema is not consistent with ScenarioVersion model, BadRequest will be raised(only extra keys will be detected currently) 5. in post, if project already exist, return Conflict with already exist message 6. in update, if a version appears more than once, also return Conflict with already exist message 7. add update with conflict unittest for projects Change-Id: I0d2c8a5567f3abce7b0313a64e18303af02cc002 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-25bugfix: fail to generate APIs document patchSerenaFeng1-2/+2
Change-Id: Iac5bb851514f0f688fcb72deb5f07488bc071225 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-24bugfix: fail to generate APIs documentSerenaFeng3-3/+10
Change-Id: I13c91fb34e190cd62400eccec6b755419aad89d1 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-23bugfix: malfunction of scenario equal checkSerenaFeng3-13/+26
1. bugfix equal check with[] will return list[false, true], and always True in next step check 2. in assert_res() leverage '==' will never assert even if they are not equal Change-Id: I683e3489d45b98b508f8ab8b6ef268ca9a1ebd5f Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-22Merge "bugfix: OperationFailure: the limit must be positive"Serena Feng1-15/+16
2017-08-22Merge "change scenario owner"Serena Feng4-4/+51
2017-08-22Merge "update projects in scenario"Serena Feng6-5/+247
2017-08-22Merge "in swagger operation parameter supports array type"Serena Feng1-5/+12
2017-08-22Merge "update customs in scenario"Serena Feng5-30/+222
2017-08-21bugfix: OperationFailure: the limit must be positiveSerenaFeng1-15/+16
in cursor.aggregate(), set limit=0 is not allowed, in this patch, if no records to be listed, return empty list directly, no more aggregate() JIRA: RELENG-293 Change-Id: I7317892875da9c0f785ba010b55715032dee31ce Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-21change scenario ownerSerenaFeng4-4/+51
1 bugfix owner must be explicit in ScenarioVersion model 2 change owner of scenario 3. usage: PUT /api/v1/scenarios/<scenario_name>/owner? \ installer=<installer_name>& \ version=<version_name> body: new owner Change-Id: I261468cd8445030b61e37e0f804b699d6205bdb0 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-21update projects in scenarioSerenaFeng7-10/+259
1. post, add one or more new projects 2. update, replace existed projects wholly 3. delete, delete one or more projects by name 4. in post&update, if schema is not consistent with ScenarioProject model, BadRequest will be raised(only extra keys will be detected currently) 5. in post, if project already exist, return Conflict with already exist message Change-Id: Iead585f787a4acc61abce6c9d38a036739b498d6 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-18in swagger operation parameter supports array typeSerenaFeng1-5/+12
it will be used in scenario update process later Change-Id: Ic44023169f1c0da0946e5e60339ce58076fc8807 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-18update customs in scenarioSerenaFeng5-30/+222
1) post to add one or multiple test cases 2) update to substitute all the test cases 3) delete with body to delete one or multiple test cases 4) to facilitate the process and response body usually useless, if update success all updates(scores/trust_indicators/customs), return 200 with no response body Change-Id: I5148f172989fa8e0e70ffed92ee383c0520dbb41 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-18Merge "bugfix: testapi is killed because of oom_kill"Serena Feng2-17/+19
2017-08-17impl update trust_indicator in scenarioSerenaFeng3-22/+98
Change-Id: I1afe38412926778bc84d178dbbfc3fe0cde15f69 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-16bugfix: testapi is killed because of oom_killSerenaFeng2-17/+19
if page is not provided, return page 1 to avoid large memory consume, further more to kill testapi: Out of memory: Kill process 30842 (opnfv-testapi) score 519 or sacrifice child Killed process 30842 (opnfv-testapi) total-vm:4739716kB, anon-rss:3974612kB, file-rss:0kB JIRA: RELENG-291 Change-Id: Id0e144c030aee390cc41cff8a48e3c997de4ad84 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-15update scenario scoresSerenaFeng4-6/+190
update score url: POST /api/v1/scenarios/<scenario_name>/scores? \ installer=<installer_name>& \ version=<version_name>& \ project=<project_name> add new score record interface add unit test add swagger specification Change-Id: Ib7bb31f303a9a9402325476bfdadb58aa0df560e Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-14delete obsolete scenario update codeSerenaFeng3-410/+10
1) update scenario will be subsitituted with new methods, in this patch delete the obsolete code first to make clean room 2) test_queryCombination() will fail randomly, in this patch disable it first, reopen when problem solved Change-Id: I1939876465934ea09894255712057a78f120be71 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-08-10Merge "add Pods page in webportal"Serena Feng9-504/+212
2017-08-09add Pods page in webportalSerenaFeng9-504/+212
delete OPNFV Powered Guidelines page add Pods page with create/list operations Change-Id: Ib9fd2834bd9d54ee33600458a90e3aac76382589 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-26merge swagger_base_url with ui_urlSerenaFeng9-16/+12
TestAPI used to have only one webpage, which is swagger_ui, now a new one webportal is added, and the base url is the same (http://testresults.opnfv.org/test)for them both. This patch aim to unify the urls. Change-Id: I15295975fb05f7e8c8d413e12b2b5c0784f0799a Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-24delete obsolete run_test.shSerenaFeng1-40/+0
after switching to tox, run_test.sh is not used now Change-Id: I66d40d6df47652b956f85f022843b60886ce41a2 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-21query date from oldest to newestSerenaFeng1-11/+20
Change-Id: I3d0345bb85967f48617c485bbee1dfe6fa04a644 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-21separate db methods from handler.pySerenaFeng9-54/+60
db methods are mingled in handler, which is not well structured Change-Id: I639679d3fc05a0b6528158186b8bf89e0cd10596 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-21Merge "decouple the mutual-dependence of config.py and server.py"Jose Lausuch11-68/+75
2017-07-20decouple the mutual-dependence of config.py and server.pySerenaFeng11-68/+75
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-07-20modify url to relative path to fit with testresults.opnfv.org/testgrakiss1-3/+3
Change-Id: Ia600fe310404a1ba45e9571d611eedcdc669dbc7 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>