diff options
Diffstat (limited to 'utils/test/result_collection_api/resources/pod_models.py')
-rw-r--r-- | utils/test/result_collection_api/resources/pod_models.py | 16 |
1 files changed, 12 insertions, 4 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..cc98c90ce 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,10 +25,11 @@ class PodCreateRequest(object): } +@swagger.model() class Pod(PodCreateRequest): - """ describes a POD platform """ - def __init__(self, name='', mode='', details='', role="", - _id='', create_date=''): + def __init__(self, + name='', mode='', details='', + role="", _id='', create_date=''): super(Pod, self).__init__(name, mode, details, role) self._id = _id self.creation_date = create_date @@ -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 |