summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/resources/pod_models.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-26 18:07:35 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-26 18:17:41 +0800
commit00355a8df9949edc12c41d5a8475fc17efbb03d3 (patch)
tree55a3d1a807882e8d1294f66ef248f923b3ffe6ae /utils/test/result_collection_api/resources/pod_models.py
parenta7d4197cef093a5eae141efa34c0833c76a1f183 (diff)
swagger-ize pod-apis of testAPI
JIRA: FUNCTEST-263 Change-Id: I293e05f565f882ea39bbf6368405f10241269716 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/result_collection_api/resources/pod_models.py')
-rw-r--r--utils/test/result_collection_api/resources/pod_models.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/utils/test/result_collection_api/resources/pod_models.py b/utils/test/result_collection_api/resources/pod_models.py
index b02e3c222..fcb4ddbbd 100644
--- a/utils/test/result_collection_api/resources/pod_models.py
+++ b/utils/test/result_collection_api/resources/pod_models.py
@@ -1,3 +1,5 @@
+from tornado_swagger_ui.tornado_swagger import swagger
+
__author__ = '__serena__'
# name: name of the POD e.g. zte-1
@@ -6,8 +8,9 @@ __author__ = '__serena__'
# role: ci-pod or community-pod or single-node
+@swagger.model()
class PodCreateRequest(object):
- def __init__(self, name='', mode='', details='', role=""):
+ def __init__(self, name, mode='', details='', role=""):
self.name = name
self.mode = mode
self.details = details
@@ -22,6 +25,7 @@ class PodCreateRequest(object):
}
+@swagger.model()
class Pod(PodCreateRequest):
""" describes a POD platform """
def __init__(self, name='', mode='', details='', role="",
@@ -55,7 +59,11 @@ class Pod(PodCreateRequest):
return f
+@swagger.model()
class Pods(object):
+ """
+ @ptype pods: C{list} of L{Pod}
+ """
def __init__(self, pods=list()):
self.pods = pods