diff options
author | thuva4 <tharma.thuva@gmail.com> | 2018-01-29 17:08:17 +0530 |
---|---|---|
committer | thuva4 <tharma.thuva@gmail.com> | 2018-02-06 21:13:52 +0530 |
commit | 5e37774a35b9bff0a8c5c6c81f34e8075531c3a0 (patch) | |
tree | f5d5a1ae28ddbf8571ebf9cea0680adb1a85edf4 /testapi/opnfv_testapi/handlers/deploy_result_handlers.py | |
parent | e6afa4d647a48736fb6645618d773de1c544bbd6 (diff) |
Add deploy results
Create view and controller for deploy results
Add tests for deploy results
Change-Id: Iba29e7a867d45aacd18a26dc4e2d9363cdf8928d
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/handlers/deploy_result_handlers.py')
-rw-r--r-- | testapi/opnfv_testapi/handlers/deploy_result_handlers.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testapi/opnfv_testapi/handlers/deploy_result_handlers.py b/testapi/opnfv_testapi/handlers/deploy_result_handlers.py index 973bfef..a8fcd88 100644 --- a/testapi/opnfv_testapi/handlers/deploy_result_handlers.py +++ b/testapi/opnfv_testapi/handlers/deploy_result_handlers.py @@ -1,6 +1,7 @@ from opnfv_testapi.handlers import result_handlers from opnfv_testapi.models import deploy_result_models from opnfv_testapi.tornado_swagger import swagger +from bson import objectid class GenericDeployResultHandler(result_handlers.GenericResultHandler): @@ -113,3 +114,17 @@ class DeployResultsHandler(GenericDeployResultHandler): self._create(miss_fields=miss_fields, carriers=carriers, values_check=values_check) + + +class DeployResultHandler(GenericDeployResultHandler): + @swagger.operation(nickname='getTestDeployResultById') + def get(self, result_id): + """ + @description: get a single deploy result by result_id + @rtype: L{DeployResult} + @return 200: Deploy result exist + @raise 404: Deploy result not exist + """ + query = dict() + query["_id"] = objectid.ObjectId(result_id) + self._get_one(query=query) |