From 26efacba9304071956d16a9a50a18e8f243518bb Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Fri, 18 Aug 2017 06:09:56 +0000 Subject: Create API to run a test case Two APIs are created here: 1. Run a test case 2. Get the result of the task id JIRA: FUNCTEST-853 Change-Id: I12950933b143b82fb6aeb186ea1b35ddd16e6097 Signed-off-by: Linda Wang --- functest/api/urls.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'functest/api/urls.py') diff --git a/functest/api/urls.py b/functest/api/urls.py index ca45b4be..160a3c1d 100644 --- a/functest/api/urls.py +++ b/functest/api/urls.py @@ -39,6 +39,11 @@ URLPATTERNS = [ # => GET the info of one testcase Url('/api/v1/functest/testcases/', 'v1_testcase'), + # POST /api/v1/functest/testcases/action + # {"action":"run_test_case", "args": {"opts": {}, "testcase": "vping_ssh"}} + # => Run a testcase + Url('/api/v1/functest/testcases/action', 'v1_testcase'), + # GET /api/v1/functest/testcases => GET all tiers Url('/api/v1/functest/tiers', 'v1_tiers'), @@ -48,5 +53,10 @@ URLPATTERNS = [ # GET /api/v1/functest/tiers//testcases # => GET all testcases within given tier - Url('/api/v1/functest/tiers//testcases', 'v1_testcases_in_tier') + Url('/api/v1/functest/tiers//testcases', + 'v1_testcases_in_tier'), + + # GET /api/v1/functest/tasks/ + # => GET the result of the task id + Url('/api/v1/functest/tasks/', 'v1_tasks') ] -- cgit 1.2.3-korg