summaryrefslogtreecommitdiffstats
path: root/cvp/opnfv_testapi/resources
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2018-01-26 08:22:59 +0000
committerLeo wang <grakiss.wanglei@huawei.com>2018-01-26 08:38:49 +0000
commit8bc98656a9100959109abddc509a7365cce656a0 (patch)
treeb37e3131b7e0d3671ff75910a3561c3789f1ad0d /cvp/opnfv_testapi/resources
parent16a3ffca7e42628d3d43a0d1e6dc5e61eb34799c (diff)
Bugfix: Cannot change SUT version in the new uploaded test
If we upload a new test, we can't modify the SUT version. The reason is we must predefine the model. Change-Id: I8822b078c25a015dd4cc4becfdaae141aed66359 Signed-off-by: chenjiankun <chenjiankun1@huawei.com> (cherry picked from commit fe07ad5754450cc50f84d51f474f47dc53597582)
Diffstat (limited to 'cvp/opnfv_testapi/resources')
-rw-r--r--cvp/opnfv_testapi/resources/test_models.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/cvp/opnfv_testapi/resources/test_models.py b/cvp/opnfv_testapi/resources/test_models.py
index 24b4d17b..3829cd6d 100644
--- a/cvp/opnfv_testapi/resources/test_models.py
+++ b/cvp/opnfv_testapi/resources/test_models.py
@@ -51,9 +51,18 @@ class Test(models.ModelBase):
@property trust_indicator: used for long duration test case
@ptype trust_indicator: L{TI}
"""
- def __init__(self, _id=None, owner=None, results=[],
- public="false", review="false", status="private",
- shared=[], filename="", label="", trust_indicator=None):
+ def __init__(self,
+ _id=None,
+ owner=None,
+ results=[],
+ public="false",
+ review="false",
+ status="private",
+ shared=[],
+ filename="",
+ label="",
+ sut_label="",
+ trust_indicator=None):
self._id = _id
self.owner = owner
self.results = results
@@ -64,6 +73,7 @@ class Test(models.ModelBase):
self.shared = shared
self.filename = filename
self.label = label
+ self.sut_label = sut_label
@swagger.model()