This is an old revision of the document!
The mission of this project is to provide a common way for gathering all the results of OPNFV tests projects into a single place. It should expose a REST API for the collect of results and push them into a MongoDB database.
The goal is to have three main collections in a Mongo DB:
The test result are stored in json format in the test results collection. The json format include a details field. This field shall be used to provide the details on the results. These details may be used later for the dashboard.
"details": {
 
    "timestart": 1444395967.9822,
    "duration": 40.9,
    "status": "OK"
 
}
Test projects
[
  {
    "id": 1,
    "name": "functest",    
    "description":""
  },
  {...}      
]
Test cases
[
  {
    "id":1.1,
    "name":"",
    "testproject": "1",
    "test": "",
    "description": "",
    "url":""
  },
  {...}
]
Test results
[
  {
    "_id": "55fc09a0514bc52b173a2826",
    "project_name": "functest",
    "pod_name": "opnfv-jump-2",
    "version": "Arno-R1",
    "installer": "fuel",
    "description": "",
    "creation_date": "2015-09-18 12:54:56.059000",
    "case_name": "vPing"
    "details":{
       <- the results to be put here ->
    }
  },
]
The temp Mongo DB + API is hosted in an Orange public VM (http://213.77.62.197).
| Method | Path | Description | 
|---|---|---|
| GET | /version | API version | 
| Method | Path | Description | 
|---|---|---|
| GET | /pods | Get the list of declared PODs | 
| POST | /pods |  Create a new POD   Content-Type: application/json { "name": "pod-foo", "creation_date": "YYYY-MM-DD HH:MM:SS" }  | 
	
| Method | Path | Description | 
|---|---|---|
| GET | /test_projects | Give the list of test projects | 
| GET | /test_projects/{project_name} | Give details on the selected project | 
| POST | /test_projects |  Add a Test project  Content-Type: application/json { "name": "project-foo", "description": "Example with project foo" }  | 
	
| PUT | /test_projects/{project_name} |  Update project   { <the field(s) you want to modify> }  | 
	
| DELETE | /test_projects/{project_name} |  Delete project  { }  | 
	
| Method | Path | Description | 
|---|---|---|
| GET | /test_projects/{project_name}/cases | Give details on the testcases of the foo project | 
| POST | /test_projects/{project_name}/cases |  Add test cases   Content-Type: application/json { "url": "<the url detailing the testcase>", "creation_date": "YYYY-MM-DD HH:MM:SS", "name": "vFoo", "description": "vFoo use case" }  | 
	
| PUT | /test_projects/{project_name}?case_name={case_name} |  Modify a test case  Content-Type: application/json { < the field(s) to be modified > }  | 
	
| DELETE | Remove a test case | 
| Method | Path | Description | 
|---|---|---|
| GET | Get the test results | |
| POST | Add test result in the Database | |
| PUT | Modify a test result | |
| DELETE | Delete a test result | 
Here are the key functions :
Test projects
Test cases Specifiying a test project :
Test results Specfiying both test project and test case :
This API will rely on JSON to represent states of REST resources. See the full API specification here.