aboutsummaryrefslogtreecommitdiffstats
path: root/samples/storperf.yaml
blob: 5000759e03c33fe28025a5fefd8293e49e80b31f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
##############################################################################
# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
# Sample StorPerf benchmark task config file
# StorPerf is a tool to measure block and object storage performance in an NFVI

schema: "yardstick:task:0.1"

scenarios:
-
  type: StorPerf
  options:
    agent_count: 1
    agent_image: "Ubuntu-16.04"
    public_network: "ext-net"
    volume_size: 2
    # target:
    # deadline:
    # nossd:
    # nowarm:
    block_sizes: "4096"
    queue_depths: "4"
    workload: "ws"
    StorPerf_ip: "192.168.23.2"
    query_interval: 10
    timeout: 600

  runner:
    type: Iteration
    iterations: 1

context:
  type: Dummy
an class="n">param) return result_handler(consts.API_SUCCESS, {'testcases': testcase_list}) def post(self): return self._dispatch_post() def upload_case(self, args): try: upload_file = args['file'] except KeyError: return result_handler(consts.API_ERROR, 'file must be provided') case_name = os.path.join(consts.TESTCASE_DIR, upload_file.filename) LOG.info('save case file') upload_file.save(case_name) return result_handler(consts.API_SUCCESS, {'testcase': upload_file.filename}) class V2Testcase(ApiResource): def get(self, case_name): case_path = os.path.join(consts.TESTCASE_DIR, '{}.yaml'.format(case_name)) try: with open(case_path) as f: data = f.read() except IOError as e: if e.errno == errno.ENOENT: return result_handler(consts.API_ERROR, 'case does not exist') options = {k: {'description': '', 'type': v.__class__.__name__} for k, v in jinja2schema.infer(data).items()} # [('segmentation_id', < scalar >), ('image', < string >), ('provider', < scalar >), # ('physical_network', < string >), ('packetsize', < number >)] for k, v in options.items(): if k == 'segmentation_id': options[k]['type'] = 'Number' if k == 'provider': options[k]['type'] = 'String' return result_handler(consts.API_SUCCESS, {'testcase': data, 'args': options}) def delete(self, case_name): case_path = os.path.join(consts.TESTCASE_DIR, '{}.yaml'.format(case_name)) try: os.remove(case_path) except IOError as e: if e.errno == errno.ENOENT: return result_handler(consts.API_ERROR, 'case does not exist') return result_handler(consts.API_SUCCESS, {'testcase': case_name})