releng-testresults.git
8 years agoChange nginx configuration
chenjiankun [Mon, 11 Sep 2017 06:24:45 +0000 (06:24 +0000)]
Change nginx configuration

Since landing page have changed from reporting2 to testing,
the nginx configuration need some adoption.

If the pre url change again, we need to config the base_url when start
our docker container. For example:
    docker run -itd -p 8084:8000 -e SERVER_URL testresults.opnfv.org/xxx/api opnfv/reporting:latest

Change-Id: If3c9f9af76fcfc8047b5b9559fcc8bd45740d4d2
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
8 years agoMerge "Updating reporting url and fixed a bug"
Serena Feng [Mon, 11 Sep 2017 01:21:27 +0000 (01:21 +0000)]
Merge "Updating reporting url and fixed a bug"

8 years agoMerge "Remove VNF catalogue from releng It has been transfered to sample vnf repo...
Aric Gardner [Fri, 8 Sep 2017 19:02:46 +0000 (19:02 +0000)]
Merge "Remove VNF catalogue from releng It has been transfered to sample vnf repo [1]"

8 years agoRemove VNF catalogue from releng
Morgan Richomme [Fri, 8 Sep 2017 06:43:19 +0000 (08:43 +0200)]
Remove VNF catalogue from releng
It has been transfered to sample vnf repo [1]

[1]: https://git.opnfv.org/samplevnf/tree/VNF_Catalogue

Change-Id: I418151bd24517efeb66fc0ae76cb9e091bd130f6
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agoUpdating reporting url and fixed a bug
Sakala Venkata Krishna Rohit [Fri, 11 Aug 2017 04:42:12 +0000 (10:12 +0530)]
Updating reporting url and fixed a bug

Changing the url of the reporting to the original one.

Change-Id: I2973a4b7d28cbdd725a4764dffbf777c3fc2e937
Signed-off-by: Sakala Venkata Krishna Rohit <rohitsakala@gmail.com>
8 years agoAdd bottlenecks to reporting
Morgan Richomme [Thu, 7 Sep 2017 07:21:42 +0000 (09:21 +0200)]
Add bottlenecks to reporting

very basic approach based on 1 case posca_factor_ping
Give a feedback on the CI activity of bottlenecks

Change-Id: Iaa84abac6b00ba48a771250433a9f9a068de453f
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agohide cas ticket from web portal
SerenaFeng [Wed, 6 Sep 2017 06:21:23 +0000 (14:21 +0800)]
hide cas ticket from web portal

In the previous implementation, when login the url will shown as:
http://localhost:8000/?ticket=ST-5WzYs6SD2A#/
this patch aims to hide the ticket mechanism.

1) add /api/v1/auth/signin_return to process login verify
2) refactor code, leverage SignBaseHanlder() to manage casclient

Change-Id: I62e23eb69ee52304c30753e861b4f0a4e0d45541
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
8 years agoMerge "Refactored docker watchdog code"
Morgan Richomme [Tue, 5 Sep 2017 12:19:25 +0000 (12:19 +0000)]
Merge "Refactored docker watchdog code"

8 years agoMerge "hide create_pod function from anonymous user"
Serena Feng [Tue, 5 Sep 2017 12:08:46 +0000 (12:08 +0000)]
Merge "hide create_pod function from anonymous user"

8 years agobugfix: TestAPI start failed due to config.ini not found
SerenaFeng [Tue, 5 Sep 2017 09:14:16 +0000 (17:14 +0800)]
bugfix: TestAPI start failed due to config.ini not found

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>
8 years agoMerge "bugfix: leverage data_files to stop hacking setup.py"
Serena Feng [Tue, 5 Sep 2017 08:24:46 +0000 (08:24 +0000)]
Merge "bugfix: leverage data_files to stop hacking setup.py"

8 years agobugfix: container start failed due to config_file set to Nonetype
SerenaFeng [Tue, 5 Sep 2017 03:45:45 +0000 (11:45 +0800)]
bugfix: container start failed due to config_file set to Nonetype

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>
8 years agoMerge "improve: discard venv support for official product"
Serena Feng [Tue, 5 Sep 2017 02:00:33 +0000 (02:00 +0000)]
Merge "improve: discard venv support for official product"

8 years agoAdd 2 files forgotten in previous commit for vsperf integration
Morgan Richomme [Mon, 4 Sep 2017 12:19:45 +0000 (14:19 +0200)]
Add 2 files forgotten in previous commit for vsperf integration

Change-Id: Ibfd36814ac09d16ba4b3d365e04bf3b39a1ef7db
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
8 years agoMerge "Add vsperf in reporting"
Morgan Richomme [Mon, 4 Sep 2017 12:15:44 +0000 (12:15 +0000)]
Merge "Add vsperf in reporting"

8 years agoRefactored docker watchdog code
Sakala Venkata Krishna Rohit [Mon, 4 Sep 2017 11:29:05 +0000 (16:59 +0530)]
Refactored docker watchdog code

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>
8 years agobugfix: leverage data_files to stop hacking setup.py
SerenaFeng [Mon, 4 Sep 2017 07:57:23 +0000 (15:57 +0800)]
bugfix: leverage data_files to stop hacking setup.py

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>
8 years agohide create_pod function from anonymous user
SerenaFeng [Mon, 4 Sep 2017 10:09:49 +0000 (18:09 +0800)]
hide create_pod function from anonymous user

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>
8 years agoimprove: discard venv support for official product
SerenaFeng [Mon, 4 Sep 2017 08:46:30 +0000 (16:46 +0800)]
improve: discard venv support for official product

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>
8 years agoAdd vsperf in reporting
Morgan Richomme [Mon, 28 Aug 2017 09:34:45 +0000 (11:34 +0200)]
Add vsperf in reporting

fix some pep8 errors in other projects

Change-Id: Iea68b0d495f7fbe892ec866fb70b8354ad9ff3c2
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
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)"