update versions under scenario
authorSerenaFeng <feng.xiaowei@zte.com.cn>
Wed, 23 Aug 2017 06:04:59 +0000 (14:04 +0800)
committerSerenaFeng <feng.xiaowei@zte.com.cn>
Fri, 25 Aug 2017 05:54:16 +0000 (13:54 +0800)
commit3fbd55c9b9550c0248827eb705d60ec2ce4cc658
treead23ede8955e4ac439ae34e57f8f5ecde871e8fa
parent2eb503cb2e3496131c21954506da58b056c8fb46
update versions under scenario

1. post, add one or more new versions
2. update, replace existed version as a totality
3. delete, delete one or more versions by name
4. in post&update, if schema is not consistent with ScenarioVersion model,
BadRequest will be raised(only extra keys will be detected currently)
5. in post, if project already exist, return Conflict with already exist
message
6. in update, if a version appears more than once, also return Conflict
with already exist message
7. add update with conflict unittest for projects

Change-Id: I0d2c8a5567f3abce7b0313a64e18303af02cc002
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
testapi/opnfv_testapi/resources/models.py
testapi/opnfv_testapi/resources/scenario_handlers.py
testapi/opnfv_testapi/router/url_mappings.py
testapi/opnfv_testapi/tests/unit/resources/test_scenario.py