Merge "Create API to update openrc"
authorLinda Wang <wangwulin@huawei.com>
Mon, 21 Aug 2017 14:36:49 +0000 (14:36 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 21 Aug 2017 14:36:49 +0000 (14:36 +0000)
1  2 
functest/api/urls.py

diff --combined functest/api/urls.py
@@@ -32,6 -32,10 +32,10 @@@ URLPATTERNS = 
      # GET /api/v1/functest/openstack/credentials => GET credentials
      Url('/api/v1/functest/openstack/credentials', 'v1_creds'),
  
+     # POST /api/v1/functest/openstack/action
+     # {"action":"update_openrc", "args": {"openrc": {}}} => Update openrc
+     Url('/api/v1/functest/openstack/action', 'v1_creds'),
      # GET /api/v1/functest/testcases => GET all testcases
      Url('/api/v1/functest/testcases', 'v1_test_cases'),
  
      # => GET the info of one testcase
      Url('/api/v1/functest/testcases/<testcase_name>', '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'),
  
  
      # GET /api/v1/functest/tiers/<tier_name>/testcases
      # => GET all testcases within given tier
 -    Url('/api/v1/functest/tiers/<tier_name>/testcases', 'v1_testcases_in_tier')
 +    Url('/api/v1/functest/tiers/<tier_name>/testcases',
 +        'v1_testcases_in_tier'),
 +
 +    # GET /api/v1/functest/tasks/<task_id>
 +    # => GET the result of the task id
 +    Url('/api/v1/functest/tasks/<task_id>', 'v1_tasks')
  ]