Merge "subprocess.call para stdout=PIPE is risky"
[yardstick.git] / api / swagger / models.py
1 ##############################################################################
2 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
3 #
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 flask_restful import fields
10 from flask_restful_swagger import swagger
11
12
13 # for testcases/action runTestCase action
14 @swagger.model
15 class TestCaseActionArgsOptsTaskArgModel:
16     resource_fields = {
17     }
18
19
20 @swagger.model
21 class TestCaseActionArgsOptsModel:
22     resource_fields = {
23         'task-args': TestCaseActionArgsOptsTaskArgModel,
24         'keep-deploy': fields.String,
25         'suite': fields.String
26     }
27
28
29 @swagger.model
30 class TestCaseActionArgsModel:
31     resource_fields = {
32         'testcase': fields.String,
33         'opts': TestCaseActionArgsOptsModel
34     }
35
36
37 @swagger.model
38 class TestCaseActionModel:
39     resource_fields = {
40         'action': fields.String,
41         'args': TestCaseActionArgsModel
42     }
43
44
45 # for results
46 @swagger.model
47 class ResultModel:
48     resource_fields = {
49         'status': fields.String,
50         'result': fields.List
51     }