releng-testresults.git
8 years agoclarify obsoleted test configuration files
SerenaFeng [Wed, 30 Aug 2017 08:33:31 +0000 (16:33 +0800)]
clarify obsoleted test configuration files

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>
8 years agoMerge "leverage LFID as Authentication"
Serena Feng [Mon, 4 Sep 2017 01:08:34 +0000 (01:08 +0000)]
Merge "leverage LFID as Authentication"

8 years agoMerge "Add watchdog into testresults server to restart docker containers."
Aric Gardner [Fri, 1 Sep 2017 18:17:22 +0000 (18:17 +0000)]
Merge "Add watchdog into testresults server to restart docker containers."

8 years agoMerge "bug fix: reporting Tempest"
Morgan Richomme [Fri, 1 Sep 2017 07:03:15 +0000 (07:03 +0000)]
Merge "bug fix: reporting Tempest"

8 years agoMerge "Added the validation for name field in create pod function"
Serena Feng [Fri, 1 Sep 2017 01:17:40 +0000 (01:17 +0000)]
Merge "Added the validation for name field in create pod function"

8 years agobug fix: reporting Tempest
Morgan Richomme [Thu, 31 Aug 2017 07:07:06 +0000 (09:07 +0200)]
bug fix: reporting Tempest

not updated since Colorado and data model changed

 - minor fixes to match data model
 - pep8/pylint correction

Change-Id: I3a0a9ea689d25b3cfff35cb1ec39329981627bc6
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agoleverage LFID as Authentication
SerenaFeng [Wed, 30 Aug 2017 03:59:46 +0000 (11:59 +0800)]
leverage LFID as Authentication

delete openid authentication
add LFID authentication

Change-Id: Iead144b5130bce51448024e65092fdea3bb2f07a
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoAdded the validation for name field in create pod function
thuva4 [Tue, 29 Aug 2017 10:30:58 +0000 (16:00 +0530)]
Added the validation for name field in create pod function

Change-Id: I18a072c7b2677794a64693135904cf97eb7b3349
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
8 years agoAdd watchdog into testresults server to restart docker containers.
Sakala Venkata Krishna Rohit [Wed, 16 Aug 2017 03:44:04 +0000 (09:14 +0530)]
Add watchdog into testresults server to restart docker containers.

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>
8 years agoMerge "bug fix for qtip reporting"
Morgan Richomme [Tue, 29 Aug 2017 07:41:36 +0000 (07:41 +0000)]
Merge "bug fix for qtip reporting"

8 years agoMerge "leverage setup.py directly to install TestAPI"
Serena Feng [Tue, 29 Aug 2017 01:09:23 +0000 (01:09 +0000)]
Merge "leverage setup.py directly to install TestAPI"

8 years agobug fix for qtip reporting
Morgan Richomme [Mon, 28 Aug 2017 15:53:45 +0000 (17:53 +0200)]
bug fix for qtip reporting

 - fix right path (version duplicated in path)
 - fix template for nav links in qtip reporting page

Change-Id: I7e14bea3feb5e6fad694e2837b3048b9cd8d5825
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agoMerge "update scenario name"
Serena Feng [Mon, 28 Aug 2017 10:00:47 +0000 (10:00 +0000)]
Merge "update scenario name"

8 years agoMerge "update installer under scenario"
Serena Feng [Mon, 28 Aug 2017 09:28:11 +0000 (09:28 +0000)]
Merge "update installer under scenario"

8 years agoMerge "simplify unit tests implementation of update scenario"
Serena Feng [Mon, 28 Aug 2017 08:27:48 +0000 (08:27 +0000)]
Merge "simplify unit tests implementation of update scenario"

8 years agoMerge "update versions under scenario"
Serena Feng [Mon, 28 Aug 2017 07:50:12 +0000 (07:50 +0000)]
Merge "update versions under scenario"

8 years agoSplit HA and NOHA scenarios into 2 tables in reporting
Morgan Richomme [Fri, 25 Aug 2017 14:05:06 +0000 (16:05 +0200)]
Split HA and NOHA scenarios into 2 tables in reporting

the goal is to vizualize more quickly the HA and NOHA scenario
Note that if no scenario is available, the table title is displayed

Change-Id: Ibdade30aadf40fe4f7b9bfe547d23c186cb3e1df
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agoleverage setup.py directly to install TestAPI
SerenaFeng [Fri, 25 Aug 2017 09:56:55 +0000 (17:56 +0800)]
leverage setup.py directly to install TestAPI

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>
8 years agoMerge "bug fix: installation of node, bower and grunt for reporting docker"
Morgan Richomme [Fri, 25 Aug 2017 08:06:18 +0000 (08:06 +0000)]
Merge "bug fix: installation of node, bower and grunt for reporting docker"

8 years agoupdate scenario name
SerenaFeng [Wed, 23 Aug 2017 07:54:45 +0000 (15:54 +0800)]
update scenario name

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>
8 years agoupdate installer under scenario
SerenaFeng [Wed, 23 Aug 2017 07:11:51 +0000 (15:11 +0800)]
update installer under scenario

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>
8 years agosimplify unit tests implementation of update scenario
SerenaFeng [Wed, 23 Aug 2017 06:32:41 +0000 (14:32 +0800)]
simplify unit tests implementation of update scenario

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>
8 years agoupdate versions under scenario
SerenaFeng [Wed, 23 Aug 2017 06:04:59 +0000 (14:04 +0800)]
update versions under scenario

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>
8 years agobugfix: fail to generate APIs document patch
SerenaFeng [Fri, 25 Aug 2017 04:34:26 +0000 (12:34 +0800)]
bugfix: fail to generate APIs document patch

Change-Id: Iac5bb851514f0f688fcb72deb5f07488bc071225
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agobugfix: fail to generate APIs document
SerenaFeng [Thu, 24 Aug 2017 10:18:27 +0000 (18:18 +0800)]
bugfix: fail to generate APIs document

Change-Id: I13c91fb34e190cd62400eccec6b755419aad89d1
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agobug fix: installation of node, bower and grunt for reporting docker
Morgan Richomme [Wed, 23 Aug 2017 07:56:11 +0000 (09:56 +0200)]
bug fix: installation of node, bower and grunt for reporting docker

 - change node installation process
 - clean setup (no need of pbr)

Change-Id: I9015486e3892e7c949bad5140cc4180ec9f07aa7
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agobugfix: malfunction of scenario equal check
SerenaFeng [Wed, 23 Aug 2017 03:09:15 +0000 (11:09 +0800)]
bugfix: malfunction of scenario equal check

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>
8 years agoMerge "Landing page adoption"
Morgan Richomme [Tue, 22 Aug 2017 06:53:44 +0000 (06:53 +0000)]
Merge "Landing page adoption"

8 years agoMerge "bugfix: OperationFailure: the limit must be positive"
Serena Feng [Tue, 22 Aug 2017 01:42:55 +0000 (01:42 +0000)]
Merge "bugfix: OperationFailure: the limit must be positive"

8 years agoMerge "change scenario owner"
Serena Feng [Tue, 22 Aug 2017 01:42:46 +0000 (01:42 +0000)]
Merge "change scenario owner"

8 years agoMerge "update projects in scenario"
Serena Feng [Tue, 22 Aug 2017 01:42:36 +0000 (01:42 +0000)]
Merge "update projects in scenario"

8 years agoMerge "in swagger operation parameter supports array type"
Serena Feng [Tue, 22 Aug 2017 01:42:23 +0000 (01:42 +0000)]
Merge "in swagger operation parameter supports array type"

8 years agoMerge "update customs in scenario"
Serena Feng [Tue, 22 Aug 2017 01:41:57 +0000 (01:41 +0000)]
Merge "update customs in scenario"

8 years agobugfix: OperationFailure: the limit must be positive
SerenaFeng [Mon, 21 Aug 2017 10:54:07 +0000 (18:54 +0800)]
bugfix: OperationFailure: the limit must be positive

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>
8 years agochange scenario owner
SerenaFeng [Mon, 21 Aug 2017 09:27:52 +0000 (17:27 +0800)]
change scenario owner

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>
8 years agoupdate projects in scenario
SerenaFeng [Fri, 18 Aug 2017 10:01:14 +0000 (18:01 +0800)]
update projects in scenario

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>
8 years agoLanding page adoption
chenjiankun [Mon, 21 Aug 2017 08:51:05 +0000 (08:51 +0000)]
Landing page adoption

Since testapi have done some changes on scenarios api,
so landing page should do some adoption.

Change-Id: Ib5d1df03e2c50c7d6c038200d97f2057b90e48af
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
8 years agoin swagger operation parameter supports array type
SerenaFeng [Fri, 18 Aug 2017 10:02:09 +0000 (18:02 +0800)]
in swagger operation parameter supports array type

it will be used in scenario update process later

Change-Id: Ic44023169f1c0da0946e5e60339ce58076fc8807
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoupdate customs in scenario
SerenaFeng [Thu, 17 Aug 2017 10:43:56 +0000 (18:43 +0800)]
update customs in scenario

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>
8 years agoMerge "bugfix: testapi is killed because of oom_kill"
Serena Feng [Fri, 18 Aug 2017 01:00:25 +0000 (01:00 +0000)]
Merge "bugfix: testapi is killed because of oom_kill"

8 years agoMerge "impl update trust_indicator in scenario"
Serena Feng [Fri, 18 Aug 2017 00:59:57 +0000 (00:59 +0000)]
Merge "impl update trust_indicator in scenario"

8 years agoimpl update trust_indicator in scenario
SerenaFeng [Wed, 16 Aug 2017 07:38:23 +0000 (15:38 +0800)]
impl update trust_indicator in scenario

Change-Id: I1afe38412926778bc84d178dbbfc3fe0cde15f69
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoMerge "update scenario scores"
Serena Feng [Thu, 17 Aug 2017 01:13:40 +0000 (01:13 +0000)]
Merge "update scenario scores"

8 years agoMerge "delete obsolete scenario update code"
Serena Feng [Thu, 17 Aug 2017 01:13:32 +0000 (01:13 +0000)]
Merge "delete obsolete scenario update code"

8 years agobugfix: testapi is killed because of oom_kill
SerenaFeng [Wed, 16 Aug 2017 09:12:14 +0000 (17:12 +0800)]
bugfix: testapi is killed because of oom_kill

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>
8 years agoMerge "Bug fix: generate fuel reporting page when no aarch64 available"
Morgan Richomme [Wed, 16 Aug 2017 08:33:54 +0000 (08:33 +0000)]
Merge "Bug fix: generate fuel reporting page when no aarch64 available"

8 years agoupdate scenario scores
SerenaFeng [Mon, 14 Aug 2017 09:41:02 +0000 (17:41 +0800)]
update scenario scores

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>
8 years agodelete obsolete scenario update code
SerenaFeng [Mon, 14 Aug 2017 06:52:59 +0000 (14:52 +0800)]
delete obsolete scenario update code

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>
8 years agoBug fix: generate fuel reporting page when no aarch64 available
Morgan Richomme [Fri, 11 Aug 2017 12:22:27 +0000 (14:22 +0200)]
Bug fix: generate fuel reporting page when no aarch64 available

In fuel we may deal with x86 or aarch64 architecture
We generate dedicated reporting page
- fuel@x86
- fuel@aarch64

However when there is no results for one of the architecture
the test on the number of architecture lead to a bug

Change-Id: I9906bd6078c8493587dc667eb23399a1e8311e77
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agoAdd daisy to reporting
Morgan Richomme [Fri, 11 Aug 2017 12:18:05 +0000 (14:18 +0200)]
Add daisy to reporting

Change-Id: I5fd940b8c1be1c327cfcd481c27049f94ae2f175
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agoMerge "Initiate packetization of Testing reporting"
Morgan Richomme [Fri, 11 Aug 2017 12:14:01 +0000 (12:14 +0000)]
Merge "Initiate packetization of Testing reporting"

8 years agoMerge "add Pods page in webportal"
Serena Feng [Thu, 10 Aug 2017 01:20:22 +0000 (01:20 +0000)]
Merge "add Pods page in webportal"

8 years agoInitiate packetization of Testing reporting
Morgan Richomme [Tue, 4 Jul 2017 15:23:33 +0000 (17:23 +0200)]
Initiate packetization of Testing reporting

Testing reporting provides
- static reporting pages [1] (jinja2)
- landing pages including test case catalogue [2] (angular)

It consumes the Test API to build web pages providing status for
the testing projects (so far functest, yardstick, storperf and
qtip).

Dockerization has been initiated [3]. The goal is to replace the
static page hosted on testresults.opnfv.org by a docker regenerated
and redeployed when reporting code is changed

But the docker and more generally the testing reporting directory
must be refactored to
- manage dependencies properly
- leverage tox (py27, docs, pylint, pep8)

This patch
- setups tox (py27, pep8, pylint, docs)
- integrate the requirement management
- fix pep8 errors
- introduce 1 dummy unit test

This patch does not
- fix pylint errors
- create any doc

[1]: http://testresults.opnfv.org/reporting2/display/index.html
[2]: http://testresults.opnfv.org/reporting2/reporting/index.html
[3]: https://gerrit.opnfv.org/gerrit/#/c/36735/

Change-Id: I4613de7ca7036d6c6bbb8f58ade492b1d673599b
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agoadd Pods page in webportal
SerenaFeng [Wed, 26 Jul 2017 09:34:16 +0000 (17:34 +0800)]
add Pods page in webportal

delete OPNFV Powered Guidelines page
add Pods page with create/list operations

Change-Id: Ib9fd2834bd9d54ee33600458a90e3aac76382589
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agomerge swagger_base_url with ui_url
SerenaFeng [Wed, 26 Jul 2017 06:40:56 +0000 (14:40 +0800)]
merge swagger_base_url with ui_url

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>
8 years agodelete obsolete run_test.sh
SerenaFeng [Mon, 24 Jul 2017 07:49:31 +0000 (15:49 +0800)]
delete obsolete run_test.sh

after switching to tox, run_test.sh is not used now

Change-Id: I66d40d6df47652b956f85f022843b60886ce41a2
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoquery date from oldest to newest
SerenaFeng [Thu, 20 Jul 2017 10:20:21 +0000 (18:20 +0800)]
query date from oldest to newest

Change-Id: I3d0345bb85967f48617c485bbee1dfe6fa04a644
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoseparate db methods from handler.py
SerenaFeng [Fri, 14 Jul 2017 11:27:44 +0000 (19:27 +0800)]
separate db methods from handler.py

db methods are mingled in handler, which is not well structured

Change-Id: I639679d3fc05a0b6528158186b8bf89e0cd10596
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoMerge "decouple the mutual-dependence of config.py and server.py"
Jose Lausuch [Fri, 21 Jul 2017 11:58:24 +0000 (11:58 +0000)]
Merge "decouple the mutual-dependence of config.py and server.py"

8 years agodecouple the mutual-dependence of config.py and server.py
SerenaFeng [Thu, 13 Jul 2017 12:09:10 +0000 (20:09 +0800)]
decouple the mutual-dependence of config.py and server.py

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>
8 years agomodify url to relative path to fit with testresults.opnfv.org/test
grakiss [Thu, 20 Jul 2017 06:59:30 +0000 (14:59 +0800)]
modify url to relative path to fit with testresults.opnfv.org/test

Change-Id: Ia600fe310404a1ba45e9571d611eedcdc669dbc7
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
8 years agorole based access control and result upload
grakiss [Fri, 7 Jul 2017 07:06:29 +0000 (15:06 +0800)]
role based access control and result upload

1. add role for user
2. user can upload test results

Change-Id: I1c5370be7818edb0394f05e8b81f975deb98b286
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
8 years agoMerge "bugfix: pagination raise exception when no records returned"
Serena Feng [Wed, 19 Jul 2017 09:48:06 +0000 (09:48 +0000)]
Merge "bugfix: pagination raise exception when no records returned"

8 years agoMerge "bugfix: query doesn't work well with period=1"
Serena Feng [Wed, 19 Jul 2017 09:47:59 +0000 (09:47 +0000)]
Merge "bugfix: query doesn't work well with period=1"

8 years agoMerge "bugfix: mix order of Arno results"
Serena Feng [Wed, 19 Jul 2017 09:47:53 +0000 (09:47 +0000)]
Merge "bugfix: mix order of Arno results"

8 years agobugfix: pagination raise exception when no records returned
SerenaFeng [Wed, 19 Jul 2017 09:18:44 +0000 (17:18 +0800)]
bugfix: pagination raise exception when no records returned

if no records returned, it will raise 'Request page > total_pages'
error. this patch is submitted to fix this

JIRA: RELENG-281

Change-Id: I447247c55c64674d44d21d6f4ac8bb3ef725cfb0
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agobugfix: query doesn't work well with period=1
SerenaFeng [Wed, 19 Jul 2017 05:29:53 +0000 (13:29 +0800)]
bugfix: query doesn't work well with period=1

when querying by date, if $lt is not provided,
the empty/None/null/'' results will also be returned,
the patch aims to fix this issue by adding
$lt = datetime.now() if not provided

JIRA: RELENG-212

Change-Id: Ida1e7d386a88d4ab640441df161c1fe134593f82
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agobugfix: mix order of Arno results
SerenaFeng [Tue, 18 Jul 2017 07:52:28 +0000 (15:52 +0800)]
bugfix: mix order of Arno results

because start_date is not always in the same format or timezone,
sort by start_date will be misordered some times, in this patch
leverage '_id' to do the sort, it is generated by mongodb itself,
always upscend.

JIRA: FUNCTEST-694
JIRA: RELENG-213

Change-Id: Ie0ed5cd09c3f7abb1803d72abe5ecab440c1569c
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoleverage openstack's requirements rule
SerenaFeng [Thu, 13 Jul 2017 07:48:52 +0000 (15:48 +0800)]
leverage openstack's requirements rule

change requirements.txt and test-requirements.txt to keep
consistent with openstack's global-requirements.txt

Change-Id: I0e62c88b957136438a23e85e41d775194bdc8757
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoleverage tox and pytest to execute unit test
SerenaFeng [Wed, 12 Jul 2017 07:18:39 +0000 (15:18 +0800)]
leverage tox and pytest to execute unit test

Change-Id: I20856e1b445587f0d8ee23e792793af863743252
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agotestapi: bugfix of tox
MatthewLi [Fri, 14 Jul 2017 04:30:50 +0000 (00:30 -0400)]
testapi: bugfix of tox

error log

https://gerrit.opnfv.org/gerrit/#/c/37053/
https://build.opnfv.org/ci/job/testapi-verify-master/220/console

Change-Id: Id278edad06c2852c662392d75fd3cf4041b03451
Signed-off-by: MatthewLi <lijun_1203@126.com>
8 years agoMerge "leverage testapi's own gitignore"
Serena Feng [Thu, 13 Jul 2017 14:31:54 +0000 (14:31 +0000)]
Merge "leverage testapi's own gitignore"

8 years agoleverage testapi's own gitignore
SerenaFeng [Wed, 12 Jul 2017 06:43:31 +0000 (14:43 +0800)]
leverage testapi's own gitignore

some files/dirs should be gitignored in testapi,
but they may be needed in releng, this patch aims to
manage gitignore by testapi itself

Change-Id: I3c57d1199145d7f062d4e48aa8216ae34672f455
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agomove resources unit tests to tests/unit/resources
SerenaFeng [Wed, 12 Jul 2017 06:27:58 +0000 (14:27 +0800)]
move resources unit tests to tests/unit/resources

As webportal is introduced, the project structure
is becoming more complex, it is time to make it a
a little bit more official

Change-Id: Id380d37b07719f053b0bd385a326a2f2944a4b22
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoMerge "Reporting docker deployment improvement"
Morgan Richomme [Thu, 6 Jul 2017 09:44:05 +0000 (09:44 +0000)]
Merge "Reporting docker deployment improvement"

8 years agoReporting docker deployment improvement
chenjiankun [Thu, 6 Jul 2017 03:45:01 +0000 (03:45 +0000)]
Reporting docker deployment improvement

In the patch, I make build pages(landing page ...),
when docker build, when run a container, we can set
the api url(default:testresults.opnfv.org/reporting2) by -e;

For example:
1. In testresults.opnfv.org:
docker run -itd -p 8888:8000 -p 80:80 opnfv/reporting:tag
visit: http://testresults.opnfv.org/reporting2/reporting/index.html

2. Personal use:
docker run -itd -p 8888:8000 -p 80:80 -e SERVER_URL=192.168.131.2:8888 opnfv/reporting:tag
visit: http://192.168.131.2:8888/reporting/index.html

Change-Id: Ib838c12e785151acf9852f25eab254aedc520a1d
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
8 years agobugfix: hardcoded testapi urls
SerenaFeng [Wed, 5 Jul 2017 08:20:54 +0000 (16:20 +0800)]
bugfix: hardcoded testapi urls

testapi webportal's urls are fixed in configure files
this patch aims to modify them according to base_url
provided when bringing up container

Change-Id: I29c461fc3b837e54d4ff5330dcaa520637590ff7
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoMerge "Add jenkins jobs for automatic reporting dashboard deployment"
Jose Lausuch [Tue, 4 Jul 2017 07:29:05 +0000 (07:29 +0000)]
Merge "Add jenkins jobs for automatic reporting dashboard deployment"

8 years agoAdd jenkins jobs for automatic reporting dashboard deployment
rohitsakala [Thu, 29 Jun 2017 16:38:05 +0000 (22:08 +0530)]
Add jenkins jobs for automatic reporting dashboard deployment

Jenkins Jobs have been added for automating the deployment of the
reporting dashboard. Also multijob has been added for automating the
update of docker in the docker hub and generating docs which is empty
for now. Modified unit tests of reporting to make it run from any
directory.

Modified the testapi jenkins jobs yaml file to generic so that many
other modules which may have the same usecases can be integrated easily
just like the reporting one that is done now.

Change-Id: Id13a55416e17199dae1dd6ce64f7c167d117ba37
Signed-off-by: Sakala Venkata Krishna Rohit <rohitsakala@gmail.com>
8 years agoMerge "bug fix: typo in bottlenecks naming (reporting page)"
Aric Gardner [Thu, 29 Jun 2017 18:44:21 +0000 (18:44 +0000)]
Merge "bug fix: typo in bottlenecks naming (reporting page)"

8 years agoMerge "refactor list operation"
Jose Lausuch [Wed, 28 Jun 2017 17:48:29 +0000 (17:48 +0000)]
Merge "refactor list operation"

8 years agoMerge "bugfix: Exception when the results is empty"
Morgan Richomme [Wed, 28 Jun 2017 15:33:05 +0000 (15:33 +0000)]
Merge "bugfix: Exception when the results is empty"

8 years agorefactor list operation
SerenaFeng [Wed, 28 Jun 2017 06:10:45 +0000 (14:10 +0800)]
refactor list operation

all operations mix together make it very difficult to read

Change-Id: I7e4a12fd13a7aa0dc0c8fc09b69c7e43a2ab18ac
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agobugfix: Exception when the results is empty
SerenaFeng [Wed, 28 Jun 2017 03:22:59 +0000 (11:22 +0800)]
bugfix: Exception when the results is empty

list operation crash when limit is not provided, error message:
OperationFailure: the limit must be positive

JIRA: RELENG-265

Change-Id: Id8db93b594010d054a71d301d9c42eed113c12e1
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoMerge "bugfix: pagination crash due to memory limitation"
Jose Lausuch [Tue, 27 Jun 2017 13:37:17 +0000 (13:37 +0000)]
Merge "bugfix: pagination crash due to memory limitation"

8 years agobug fix: typo in bottlenecks naming (reporting page)
Morgan Richomme [Tue, 27 Jun 2017 13:14:46 +0000 (15:14 +0200)]
bug fix: typo in bottlenecks naming (reporting page)

Change-Id: Ifb2047e688117c7c9af33031467f2025d530f187
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agobugfix: pagination crash due to memory limitation
SerenaFeng [Tue, 27 Jun 2017 11:13:32 +0000 (19:13 +0800)]
bugfix: pagination crash due to memory limitation

MongoDB sorts the results in memory, and the default mem limitation is
32M, if the sort operation consumes more than that it will return an
error:
OperationFailure: Executor error during find command: OperationFailed
Sort operation used more than the maximum 33554432 bytes of RAM. Add an
index, or specify a smaller limit.

To solve this problem, here we leverage aggregate() and
allowDiskUse=True, it is said will not be limited by memory

Change-Id: Id698ad1d02912e8b350a33a926fcccc390814fcc
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agobug fix: consider pagination when retrieveing results for reporting
Morgan Richomme [Mon, 26 Jun 2017 15:04:41 +0000 (17:04 +0200)]
bug fix: consider pagination when retrieveing results for reporting

Due to pagination feature introduced in test API, reporting pages
only considered the first page of results retrieved by the API
the number of pages is now detected to aggregate the results

JIRA: RELENG-259

Change-Id: I0ac90b125baf8c16341c8db22f5602fedd4cdf1b
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agoMerge "Changing urls of testapi api and resources"
Serena Feng [Fri, 23 Jun 2017 08:12:36 +0000 (08:12 +0000)]
Merge "Changing urls of testapi api and resources"

8 years agoMerge "support pagination in TestAPI"
Serena Feng [Thu, 22 Jun 2017 02:19:20 +0000 (02:19 +0000)]
Merge "support pagination in TestAPI"

8 years agoMerge "bug fix: bad format for start/time in Tempest reporting"
Morgan Richomme [Wed, 21 Jun 2017 14:46:03 +0000 (14:46 +0000)]
Merge "bug fix: bad format for start/time in Tempest reporting"

8 years agobug fix: bad format for start/time in Tempest reporting
Morgan Richomme [Wed, 21 Jun 2017 13:37:39 +0000 (15:37 +0200)]
bug fix: bad format for start/time in Tempest reporting

Change-Id: Ic9792023b9041dbe8081ff9840caa2cf2901b189
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agosupport pagination in TestAPI
SerenaFeng [Tue, 20 Jun 2017 09:40:38 +0000 (17:40 +0800)]
support pagination in TestAPI

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>
8 years agomake website accessible via testresults.opnfv.org/test
SerenaFeng [Tue, 20 Jun 2017 03:41:15 +0000 (11:41 +0800)]
make website accessible via testresults.opnfv.org/test

Currently, testapi website can not be fully accessed through
testresults.opnfv.org/test, due to http://testresults.opnfv.org/test is
not a root url. In this patch leverage relative path to make it accessible

Change-Id: I56983d2221791d8a060039ec829278d31ecb5048
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoadd filter based on begin&end time of start_date
SerenaFeng [Mon, 5 Jun 2017 07:44:16 +0000 (15:44 +0800)]
add filter based on begin&end time of start_date

filter of 'Start Date' & 'End Date' in Community Results page now works,
currently, only 20 records will be shown due to pagination is not
supported.
From server side, query from date to date is supported now, query as:
/api/v1/results?from=2016-11-01%2000:00:00&to=2017-06-01%2023:59:59

Change-Id: I482b117129dbae38fa5a2858a86442c80d87d19e
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoshow community results
SerenaFeng [Mon, 5 Jun 2017 06:14:43 +0000 (14:14 +0800)]
show community results

show latest 20 results in cummunity results page.
Because pagination is not supported, pagination related buttons
are forbiddened now

Change-Id: I3d94fc1b89845b6583dd40fe86d69407adfd2e6c
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoMerge "Change to 'catalog_description' in Catalogue page"
Morgan Richomme [Tue, 6 Jun 2017 13:16:02 +0000 (13:16 +0000)]
Merge "Change to 'catalog_description' in Catalogue page"

8 years agoMerge "substitute with testapi img"
Morgan Richomme [Tue, 6 Jun 2017 13:14:20 +0000 (13:14 +0000)]
Merge "substitute with testapi img"

8 years agosubstitute with testapi img
SerenaFeng [Mon, 5 Jun 2017 06:11:49 +0000 (14:11 +0800)]
substitute with testapi img

delete useless openstack and refstack images
add testapi-logo.png. Currently it is a free one with signature
finally we will substitute it with an official one.

Change-Id: I6c1ccaa21fab311c5858351e58bd7c8d9392a75a
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoChange to 'catalog_description' in Catalogue page
chenjiankun [Thu, 1 Jun 2017 01:49:51 +0000 (01:49 +0000)]
Change to 'catalog_description' in Catalogue page

JIRA: RELENG-231

Change-Id: Id0b770575c0d91a58b3503f8580bd658337b2cd0
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>