summaryrefslogtreecommitdiffstats
path: root/legacy/api/model/job_model.py
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/api/model/job_model.py')
-rw-r--r--legacy/api/model/job_model.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/legacy/api/model/job_model.py b/legacy/api/model/job_model.py
new file mode 100644
index 00000000..f7eb9fda
--- /dev/null
+++ b/legacy/api/model/job_model.py
@@ -0,0 +1,25 @@
+from flask_restful import fields
+from flask_restful_swagger import swagger
+
+
+@swagger.model
+class JobModel:
+ resource_fields = {
+ 'installer_type': fields.String,
+ 'installer_ip': fields.String,
+ 'max_minutes': fields.Integer,
+ 'pod_name': fields.String,
+ 'suite_name': fields.String,
+ 'type': fields.String,
+ 'benchmark_name': fields.String,
+ 'testdb_url': fields.String,
+ 'node_name': fields.String
+ }
+ required = ['installer_type', 'installer_ip']
+
+
+@swagger.model
+class JobResponseModel:
+ resource_fields = {
+ 'job_id': fields.String
+ }