diff options
author | 2016-03-17 14:54:25 +0100 | |
---|---|---|
committer | 2016-03-17 14:57:38 +0100 | |
commit | eae3aa7301f8efffc4da0a7f067de355c336579d (patch) | |
tree | 59087ff4ba6ecb1f05396bfe40bb34d23061e512 /result_collection_api/resources/models.py | |
parent | ec5072c0ccc6648d734226711b43ddb34b2b21af (diff) |
Add scenario and criteria field in the Test result object of the test API
scenario will be used for OPNFV scenario (currently using version field)
criteria will be passed or failed to give an immediate feedback on the test result status
JIRA: FUNCTEST-151
Change-Id: Iff5eb66bbf0cfbaafec0c3a6211031f6eb83c34f
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 | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/result_collection_api/resources/models.py b/result_collection_api/resources/models.py index 6f93862..35b6af1 100644 --- a/result_collection_api/resources/models.py +++ b/result_collection_api/resources/models.py @@ -151,6 +151,8 @@ class TestResult: self.creation_date = None
self.details = None
self.build_tag = None
+ self.scenario = None
+ self.criteria = None
@staticmethod
def test_result_from_dict(test_result_dict):
@@ -169,6 +171,8 @@ class TestResult: t.version = test_result_dict.get('version')
t.installer = test_result_dict.get('installer')
t.build_tag = test_result_dict.get('build_tag')
+ t.scenario = test_result_dict.get('scenario')
+ t.criteria = test_result_dict.get('criteria')
return t
@@ -182,7 +186,9 @@ class TestResult: "version": self.version,
"installer": self.installer,
"details": self.details,
- "build_tag": self.build_tag
+ "build_tag": self.build_tag,
+ "scenario": self.scenario,
+ "criteria": self.criteria
}
def format_http(self):
@@ -196,6 +202,8 @@ class TestResult: "version": self.version,
"installer": self.installer,
"details": self.details,
- "build_tag": self.build_tag
+ "build_tag": self.build_tag,
+ "scenario": self.scenario,
+ "criteria": self.criteria
}
|