summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/resources/scenario_handlers.py
diff options
context:
space:
mode:
Diffstat (limited to 'testapi/opnfv_testapi/resources/scenario_handlers.py')
-rw-r--r--testapi/opnfv_testapi/resources/scenario_handlers.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testapi/opnfv_testapi/resources/scenario_handlers.py b/testapi/opnfv_testapi/resources/scenario_handlers.py
index a8c1a94..7c8c333 100644
--- a/testapi/opnfv_testapi/resources/scenario_handlers.py
+++ b/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