summaryrefslogtreecommitdiffstats
path: root/rest_server.py
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-06-07 21:11:55 -0400
committermbeierl <mark.beierl@dell.com>2017-06-07 21:11:55 -0400
commitc7806a0f08f6114d8b1f037a77af041a2b0364d5 (patch)
tree5475cc8c118f07ba51ab3750c625e43c0bc95a6d /rest_server.py
parentc8beb26dff69dde0b41685504718a5f2bb29b4cd (diff)
Allow User-Specified Sample Size
Adds the ability to accept steady_state_sample_size as a parameter. Removes deprecated nowarm and nossd. Adds OS_PROJECT_DOMAIN_ID. Change-Id: I00c01b05cd2cbf001bc5446faa30f36137350ccf JIRA: STORPERF-139 Signed-off-by: mbeierl <mark.beierl@dell.com>
Diffstat (limited to 'rest_server.py')
-rw-r--r--rest_server.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/rest_server.py b/rest_server.py
index f6075f9..1033ca8 100644
--- a/rest_server.py
+++ b/rest_server.py
@@ -10,6 +10,9 @@
import json
import logging.config
import os
+from storperf.db.job_db import JobDB
+from storperf.plot.barchart import Barchart
+from storperf.storperf_master import StorPerfMaster
import sys
from flask import abort, Flask, request, jsonify, send_from_directory
@@ -17,10 +20,6 @@ from flask_cors import CORS, cross_origin
from flask_restful import Resource, Api, fields
from flask_restful_swagger import swagger
-from storperf.db.job_db import JobDB
-from storperf.plot.barchart import Barchart
-from storperf.storperf_master import StorPerfMaster
-
app = Flask(__name__, static_url_path="")
CORS(app)
@@ -217,9 +216,8 @@ class Configure(Resource):
class WorkloadModel:
resource_fields = {
'target': fields.String,
- 'nossd': fields.String,
- 'nowarm': fields.String,
'deadline': fields.Integer,
+ "steady_state_samples": fields.Integer,
'workload': fields.String,
'queue_depths': fields.String,
'block_sizes': fields.String
@@ -302,12 +300,6 @@ following parameters:
"deadline": if specified, the maximum duration in minutes
for any single test iteration.
-"nossd": Do not fill the target with random
-data prior to running the test,
-
-"nowarm": Do not refill the target with data
-prior to running any further tests,
-
"workload":if specified, the workload to run. Defaults to all.
""",
"required": True,
@@ -338,6 +330,9 @@ prior to running any further tests,
storperf.filename = request.json['target']
if ('deadline' in request.json):
storperf.deadline = request.json['deadline']
+ if ('steady_state_samples' in request.json):
+ storperf.steady_state_samples = request.json[
+ 'steady_state_samples']
if ('queue_depths' in request.json):
storperf.queue_depths = request.json['queue_depths']
if ('block_sizes' in request.json):