summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/resources/scenario_models.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-01-16 17:59:06 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-01-16 21:16:14 +0800
commit16d5fe234367a75a52dc33dae012df4f1098ae0b (patch)
treec06f0f97c3b1b6aaa0f4857d2f6f1c477f8c5801 /testapi/opnfv_testapi/resources/scenario_models.py
parent43092f3b023fa82c93ce2cbd6e0ca5bc16da5bf1 (diff)
implement create scenario and add unittest
JIRA: RELENG-163 Change-Id: Id715a2e5de1022cfd0a745505771d250935541bd Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/resources/scenario_models.py')
-rw-r--r--testapi/opnfv_testapi/resources/scenario_models.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/testapi/opnfv_testapi/resources/scenario_models.py b/testapi/opnfv_testapi/resources/scenario_models.py
index 0748a37..b4bb363 100644
--- a/testapi/opnfv_testapi/resources/scenario_models.py
+++ b/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()