diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-01-16 17:59:06 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-01-16 21:16:14 +0800 |
commit | c4fe6bffd4c09a70f35a116919a6b0116a6e2a3c (patch) | |
tree | c9617b3673535644de6078625f01c886af2eb824 /utils/test/testapi/opnfv_testapi/resources/scenario_models.py | |
parent | 7af92e09cf13a7184b49ffebc32e274fe46f0faa (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 'utils/test/testapi/opnfv_testapi/resources/scenario_models.py')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/resources/scenario_models.py | 13 |
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() |