summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/resources/pod_models.py
diff options
context:
space:
mode:
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