summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/resources/models.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2015-10-17 18:19:12 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2015-10-19 10:48:40 +0200
commit97ce096c0ed49a09301d762b812504f3038e9843 (patch)
tree36ea5a0c8cc463c8de6ac0c3e37a657a5f87ca8c /utils/test/result_collection_api/resources/models.py
parented1f97c622b272f91fe3bcb6fb1b8b65a27bd624 (diff)
add dashboard method to test result collection API
+ add new fields in pod section JIRA: RELENG-45 Change-Id: I8e833207b7014d7fd07769af415a4892b9e9d924 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/result_collection_api/resources/models.py')
-rw-r--r--utils/test/result_collection_api/resources/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/test/result_collection_api/resources/models.py b/utils/test/result_collection_api/resources/models.py
index 3b4d843f3..6829416bc 100644
--- a/utils/test/result_collection_api/resources/models.py
+++ b/utils/test/result_collection_api/resources/models.py
@@ -14,6 +14,8 @@ class Pod:
self._id = ""
self.name = ""
self.creation_date = ""
+ self.mode = ""
+ self.details = ""
@staticmethod
def pod_from_dict(pod_dict):
@@ -24,11 +26,15 @@ class Pod:
p._id = pod_dict.get('_id')
p.creation_date = str(pod_dict.get('creation_date'))
p.name = pod_dict.get('name')
+ p.mode = pod_dict.get('mode')
+ p.details = pod_dict.get('details')
return p
def format(self):
return {
"name": self.name,
+ "mode": self.mode,
+ "details": self.details,
"creation_date": str(self.creation_date),
}
@@ -36,6 +42,8 @@ class Pod:
return {
"_id": str(self._id),
"name": self.name,
+ "mode": self.mode,
+ "details": self.details,
"creation_date": str(self.creation_date),
}