summaryrefslogtreecommitdiffstats
path: root/api/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/urls.py')
-rw-r--r--api/urls.py52
1 files changed, 42 insertions, 10 deletions
diff --git a/api/urls.py b/api/urls.py
index 13c6c7675..2211348f3 100644
--- a/api/urls.py
+++ b/api/urls.py
@@ -8,17 +8,49 @@
##############################################################################
from __future__ import absolute_import
-from api import views
-from api.utils.common import Url
+from api import Url
urlpatterns = [
- Url('/yardstick/asynctask', views.Asynctask, 'asynctask'),
- Url('/yardstick/testcases', views.Testcases, 'testcases'),
- Url('/yardstick/testcases/release/action', views.ReleaseAction, 'release'),
- Url('/yardstick/testcases/samples/action', views.SamplesAction, 'samples'),
- Url('/yardstick/testcases/<case_name>/docs', views.CaseDocs, 'casedocs'),
- Url('/yardstick/testsuites/action', views.TestsuitesAction, 'testsuites'),
- Url('/yardstick/results', views.Results, 'results'),
- Url('/yardstick/env/action', views.EnvAction, 'env')
+ Url('/yardstick/asynctask', 'v1_async_task'),
+ Url('/yardstick/testcases', 'v1_test_case'),
+ Url('/yardstick/testcases/release/action', 'v1_release_case'),
+ Url('/yardstick/testcases/samples/action', 'v1_sample_case'),
+ Url('/yardstick/testcases/<case_name>/docs', 'v1_case_docs'),
+ Url('/yardstick/testsuites/action', 'v1_test_suite'),
+ Url('/yardstick/results', 'v1_result'),
+ Url('/yardstick/env/action', 'v1_env'),
+
+ # api v2
+ Url('/api/v2/yardstick/environments', 'v2_environments'),
+ Url('/api/v2/yardstick/environments/action', 'v2_environments'),
+ Url('/api/v2/yardstick/environments/<environment_id>', 'v2_environment'),
+
+ Url('/api/v2/yardstick/openrcs/action', 'v2_openrcs'),
+ Url('/api/v2/yardstick/openrcs/<openrc_id>', 'v2_openrc'),
+
+ Url('/api/v2/yardstick/pods/action', 'v2_pods'),
+ Url('/api/v2/yardstick/pods/<pod_id>', 'v2_pod'),
+
+ Url('/api/v2/yardstick/images', 'v2_images'),
+ Url('/api/v2/yardstick/images/action', 'v2_images'),
+
+ Url('/api/v2/yardstick/containers/action', 'v2_containers'),
+ Url('/api/v2/yardstick/containers/<container_id>', 'v2_container'),
+
+ Url('/api/v2/yardstick/projects', 'v2_projects'),
+ Url('/api/v2/yardstick/projects/action', 'v2_projects'),
+ Url('/api/v2/yardstick/projects/<project_id>', 'v2_project'),
+
+ Url('/api/v2/yardstick/tasks', 'v2_tasks'),
+ Url('/api/v2/yardstick/tasks/action', 'v2_tasks'),
+ Url('/api/v2/yardstick/tasks/<task_id>', 'v2_task'),
+
+ Url('/api/v2/yardstick/testcases', 'v2_testcases'),
+ Url('/api/v2/yardstick/testcases/action', 'v2_testcases'),
+ Url('/api/v2/yardstick/testcases/<case_name>', 'v2_testcase'),
+
+ Url('/api/v2/yardstick/testsuites', 'v2_testsuites'),
+ Url('/api/v2/yardstick/testsuites/action', 'v2_testsuites'),
+ Url('/api/v2/yardstick/testsuites/<suite_name>', 'v2_testsuite')
]