diff options
author | mbeierl <mark.beierl@dell.com> | 2017-06-07 21:11:55 -0400 |
---|---|---|
committer | Mark Beierl <mark.beierl@dell.com> | 2017-06-08 02:30:58 +0000 |
commit | 752372ec7c50f9cd1e3f012f33e50ee88362ad81 (patch) | |
tree | ade229a4d80876036d5a356dd70039ef619015a0 /rest_server.py | |
parent | a2de73c1d6d66bb9624e192d95c6a540cf31b6f7 (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>
(cherry picked from commit c7806a0f08f6114d8b1f037a77af041a2b0364d5)
Diffstat (limited to 'rest_server.py')
-rw-r--r-- | rest_server.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/rest_server.py b/rest_server.py index 574fc32..e1dd778 100644 --- a/rest_server.py +++ b/rest_server.py @@ -10,16 +10,15 @@ 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 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="") api = swagger.docs(Api(app), apiVersion='1.0') @@ -215,9 +214,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 @@ -300,12 +298,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, @@ -336,6 +328,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): |