1 ##############################################################################
2 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 from __future__ import absolute_import
13 from flasgger.utils import swag_from
15 from api.base import ApiResource
16 from api.swagger import models
18 logger = logging.getLogger(__name__)
19 logger.setLevel(logging.DEBUG)
22 TestCaseActionModel = models.TestCaseActionModel
23 TestCaseActionArgsModel = models.TestCaseActionArgsModel
24 TestCaseActionArgsOptsModel = models.TestCaseActionArgsOptsModel
25 TestCaseActionArgsOptsTaskArgModel = models.TestCaseActionArgsOptsTaskArgModel
28 class Asynctask(ApiResource):
30 return self._dispatch_get()
33 class Testcases(ApiResource):
35 return self._dispatch_get()
38 class ReleaseAction(ApiResource):
39 @swag_from(os.getcwd() + '/swagger/docs/release_action.yaml')
41 return self._dispatch_post()
44 class SamplesAction(ApiResource):
47 return self._dispatch_post()
50 TestSuiteActionModel = models.TestSuiteActionModel
51 TestSuiteActionArgsModel = models.TestSuiteActionArgsModel
52 TestSuiteActionArgsOptsModel = models.TestSuiteActionArgsOptsModel
53 TestSuiteActionArgsOptsTaskArgModel = \
54 models.TestSuiteActionArgsOptsTaskArgModel
57 class TestsuitesAction(ApiResource):
58 @swag_from(os.getcwd() + '/swagger/docs/testsuites_action.yaml')
60 return self._dispatch_post()
63 ResultModel = models.ResultModel
66 class Results(ApiResource):
68 @swag_from(os.getcwd() + '/swagger/docs/results.yaml')
70 return self._dispatch_get()
73 class EnvAction(ApiResource):
76 return self._dispatch_post()