diff options
author | 2017-02-15 10:58:36 +0800 | |
---|---|---|
committer | 2017-02-15 10:58:36 +0800 | |
commit | 315a512ff29e1948001abd03894a7fb47b282506 (patch) | |
tree | 4ddd6c5bd3866c42e8ad76d7a8bf1d36ac8ece61 /utils/test/testapi/opnfv_testapi/resources | |
parent | 9f93b28a66f8782b74252c242481248bd46f816e (diff) |
implement delete and related unittest
JIRA: RELENG-163
Change-Id: I7fe45f3e92c3dc5f5b32582561249150a2cdb8cf
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/resources')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py b/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py index a8c1a94fe..7c8c333a5 100644 --- a/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py +++ b/utils/test/testapi/opnfv_testapi/resources/scenario_handlers.py @@ -116,6 +116,17 @@ class ScenarioGURHandler(GenericScenarioHandler): db_keys = ['name'] self._update(query, db_keys) + @swagger.operation(nickname="deleteScenarioByName") + def delete(self, name): + """ + @description: delete a scenario by name + @return 200: delete success + @raise 404: scenario not exist: + """ + + query = {'name': name} + self._delete(query) + def _update_query(self, keys, data): query = dict() equal = True |