summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi/resources/scenario_models.py
diff options
context:
space:
mode:
authorSerena Feng <feng.xiaowei@zte.com.cn>2017-01-17 06:40:02 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-17 06:40:02 +0000
commita83e598c5401531d8f4010f16a7c41461fa4e828 (patch)
tree49455c08a6f250accd8567561d513447c97fd074 /utils/test/testapi/opnfv_testapi/resources/scenario_models.py
parent0505449a387df820e765cb0f52028ac5d0ba2e8c (diff)
parentc4fe6bffd4c09a70f35a116919a6b0116a6e2a3c (diff)
Merge "implement create scenario and add unittest"
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/resources/scenario_models.py')
-rw-r--r--utils/test/testapi/opnfv_testapi/resources/scenario_models.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/utils/test/testapi/opnfv_testapi/resources/scenario_models.py b/utils/test/testapi/opnfv_testapi/resources/scenario_models.py
index 0748a3738..b4bb3634b 100644
--- a/utils/test/testapi/opnfv_testapi/resources/scenario_models.py
+++ b/utils/test/testapi/opnfv_testapi/resources/scenario_models.py
@@ -61,6 +61,17 @@ class ScenarioInstaller(models.ModelBase):
@swagger.model()
+class ScenarioCreateRequest(models.ModelBase):
+ """
+ @property installers:
+ @ptype installers: C{list} of L{ScenarioInstaller}
+ """
+ def __init__(self, name='', installers=None):
+ self.name = name
+ self.installers = installers if installers else list()
+
+
+@swagger.model()
class Scenario(models.ModelBase):
"""
@property installers:
@@ -69,7 +80,7 @@ class Scenario(models.ModelBase):
def __init__(self, name='', create_date='', _id='', installers=None):
self.name = name
self._id = _id
- self.create_date = create_date
+ self.creation_date = create_date
self.installers = installers if installers else list()