diff options
author | 2015-10-17 18:19:12 +0200 | |
---|---|---|
committer | 2015-10-19 10:48:40 +0200 | |
commit | 901d25ce14b7b682872f997cfd6ac89ca718c870 (patch) | |
tree | c121ab0c46ad32fef9bd5e9dd5946f518365b5ba /result_collection_api/resources/models.py | |
parent | ace5bdeae17058ebeb04dbbb944f8cd5858ee43b (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 'result_collection_api/resources/models.py')
-rw-r--r-- | result_collection_api/resources/models.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/result_collection_api/resources/models.py b/result_collection_api/resources/models.py index 3b4d843..6829416 100644 --- a/result_collection_api/resources/models.py +++ b/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), } |