diff options
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) |