summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/resources
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-05-25 09:49:50 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-05-25 09:49:50 +0000
commit345abdddd5d263b53e3104c1cb9f657515521f77 (patch)
tree947a8079658ee09597e7d7a85a32fb0276b931d7 /utils/test/result_collection_api/resources
parenteafa734d05cc8d97730526272a1431b8e58803b5 (diff)
parent67d142c60b4f6bc5eca821a38ae79be0719053ff (diff)
Merge "Add pod role in pod description in the API"
Diffstat (limited to 'utils/test/result_collection_api/resources')
-rw-r--r--utils/test/result_collection_api/resources/pod_models.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/utils/test/result_collection_api/resources/pod_models.py b/utils/test/result_collection_api/resources/pod_models.py
index 65b82f770..b02e3c222 100644
--- a/utils/test/result_collection_api/resources/pod_models.py
+++ b/utils/test/result_collection_api/resources/pod_models.py
@@ -1,24 +1,32 @@
__author__ = '__serena__'
+# name: name of the POD e.g. zte-1
+# mode: metal or virtual
+# details: any detail
+# role: ci-pod or community-pod or single-node
+
class PodCreateRequest(object):
- def __init__(self, name='', mode='', details=''):
+ def __init__(self, name='', mode='', details='', role=""):
self.name = name
self.mode = mode
self.details = details
+ self.role = role
def format(self):
return {
"name": self.name,
"mode": self.mode,
"details": self.details,
+ "role": self.role,
}
class Pod(PodCreateRequest):
""" describes a POD platform """
- def __init__(self, name='', mode='', details='', _id='', create_date=''):
- super(Pod, self).__init__(name, mode, details)
+ 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
@@ -33,6 +41,7 @@ class Pod(PodCreateRequest):
p.name = pod_dict.get('name')
p.mode = pod_dict.get('mode')
p.details = pod_dict.get('details')
+ p.role = pod_dict.get('role')
return p
def format(self):