summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2016-12-01 00:53:04 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-01 00:53:04 +0000
commit35c360e3e41c8e736604a434781a178a8a34204a (patch)
tree8efc124105f3e7b53dd2ef6c85a6d579b1614795
parentf62146fc98322caa63c658b17589cfff280471fb (diff)
parentbce19d39136c5e830e771ee449f22fca85fec259 (diff)
Merge "Modify url mapping to make API more Restful"
-rw-r--r--api/urls.py4
-rw-r--r--api/views.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/api/urls.py b/api/urls.py
index eaaf8b6d1..323e5cb9f 100644
--- a/api/urls.py
+++ b/api/urls.py
@@ -11,7 +11,7 @@ from api.utils.common import Url
urlpatterns = [
- Url('/yardstick/test/action', views.Test, 'test'),
- Url('/yardstick/result/action', views.Result, 'result'),
+ Url('/yardstick/testcases/release/action', views.Release, 'release'),
+ Url('/yardstick/results', views.Results, 'results'),
Url('/yardstick/env/action', views.Env, 'env')
]
diff --git a/api/views.py b/api/views.py
index 7357625e0..065de673b 100644
--- a/api/views.py
+++ b/api/views.py
@@ -19,7 +19,7 @@ from api.actions import env as env_action
logger = logging.getLogger(__name__)
-class Test(Resource):
+class Release(Resource):
def post(self):
action = common_utils.translate_to_str(request.json.get('action', ''))
args = common_utils.translate_to_str(request.json.get('args', {}))
@@ -31,7 +31,7 @@ class Test(Resource):
return common_utils.error_handler('Wrong action')
-class Result(Resource):
+class Results(Resource):
def get(self):
args = common_utils.translate_to_str(request.args)
action = args.get('action', '')