summaryrefslogtreecommitdiffstats
path: root/api/swagger
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2017-01-11 03:03:10 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-11 03:03:10 +0000
commit708550dd0718abdad8862e2275cc8e025a7c55e3 (patch)
treeb11161934a59b336842fdd1658791c9d176b4eba /api/swagger
parent205729564104b309058ad011f1daf402a285d7b8 (diff)
parent52ae99e54fc67614e71bf1920848bb7b16bcd153 (diff)
Merge "Create API to run test suite"
Diffstat (limited to 'api/swagger')
-rw-r--r--api/swagger/docs/release_action.yaml (renamed from api/swagger/docs/testcases.yaml)0
-rw-r--r--api/swagger/docs/testsuites_action.yaml50
-rw-r--r--api/swagger/models.py31
3 files changed, 81 insertions, 0 deletions
diff --git a/api/swagger/docs/testcases.yaml b/api/swagger/docs/release_action.yaml
index 7bfe5e647..7bfe5e647 100644
--- a/api/swagger/docs/testcases.yaml
+++ b/api/swagger/docs/release_action.yaml
diff --git a/api/swagger/docs/testsuites_action.yaml b/api/swagger/docs/testsuites_action.yaml
new file mode 100644
index 000000000..ebf01e4ec
--- /dev/null
+++ b/api/swagger/docs/testsuites_action.yaml
@@ -0,0 +1,50 @@
+TestSuites Actions
+
+This API may offer many actions, including runTestSuite
+
+action: runTestSuite
+This api offer the interface to run a test suite in yardstick
+we will return a task_id for querying
+you can use the returned task_id to get the result data
+---
+tags:
+ - Testsuite Action
+parameters:
+ - in: body
+ name: body
+ description: this is the input json dict
+ schema:
+ id: TestSuiteActionModel
+ required:
+ - action
+ - args
+ properties:
+ action:
+ type: string
+ description: this is action for testsuite
+ default: runTestSuite
+ args:
+ schema:
+ id: TestSuiteActionArgsModel
+ required:
+ - testsuite
+ properties:
+ testsuite:
+ type: string
+ description: this is the test suite name
+ default: smoke
+ opts:
+ schema:
+ id: TestSuiteActionArgsOptsModel
+responses:
+ 200:
+ description: A result json dict
+ schema:
+ id: result
+ properties:
+ status:
+ type: string
+ default: success
+ result:
+ type: string
+ description: task_id of this task
diff --git a/api/swagger/models.py b/api/swagger/models.py
index 7c65fbbf5..9a0157e0e 100644
--- a/api/swagger/models.py
+++ b/api/swagger/models.py
@@ -42,6 +42,37 @@ class TestCaseActionModel:
}
+# for testsuite/action runTestSuite action
+@swagger.model
+class TestSuiteActionArgsOptsTaskArgModel:
+ resource_fields = {
+ }
+
+
+@swagger.model
+class TestSuiteActionArgsOptsModel:
+ resource_fields = {
+ 'task-args': TestSuiteActionArgsOptsTaskArgModel,
+ 'keep-deploy': fields.String,
+ 'suite': fields.String
+ }
+
+@swagger.model
+class TestSuiteActionArgsModel:
+ resource_fields = {
+ 'testsuite': fields.String,
+ 'opts': TestSuiteActionArgsOptsModel
+ }
+
+
+@swagger.model
+class TestSuiteActionModel:
+ resource_fields = {
+ 'action': fields.String,
+ 'args': TestSuiteActionArgsModel
+ }
+
+
# for results
@swagger.model
class ResultModel: