diff options
author | 2016-05-24 17:05:44 +0200 | |
---|---|---|
committer | 2016-05-24 17:06:01 +0200 | |
commit | 73cab1a67e1c62a192eab1286679231a3e22d52d (patch) | |
tree | 5d8441daf7ea4c8cb4005cbe75d21c2aaa7b4353 /result_collection_api/resources | |
parent | dbb71762a7dcded8eca416d496b8fb8a6a90a887 (diff) |
Add pod role in pod description in the API
JIRA: FUNCTEST-259
Change-Id: Id0c232f61244a185c7ab238d6493ef5487a9efbf
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'result_collection_api/resources')
-rw-r--r-- | result_collection_api/resources/pod_models.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/result_collection_api/resources/pod_models.py b/result_collection_api/resources/pod_models.py index 65b82f7..b02e3c2 100644 --- a/result_collection_api/resources/pod_models.py +++ b/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): |