Add support for Python 3
[yardstick.git] / api / swagger / models.py
index 7c65fbb..d3c7a9b 100644 (file)
@@ -6,6 +6,7 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
+from __future__ import absolute_import
 from flask_restful import fields
 from flask_restful_swagger import swagger
 
@@ -42,6 +43,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: