コード例 #1
0
ファイル: run_stress.py プロジェクト: Mirantis/tempest
def main():
    ns = parser.parse_args()
    result = 0
    if not ns.all:
        tests = json.load(open(ns.tests, 'r'))
    else:
        tests = discover_stress_tests(filter_attr=ns.type,
                                      call_inherited=ns.call_inherited)

    if ns.serial:
        for test in tests:
            step_result = driver.stress_openstack([test],
                                                  ns.duration,
                                                  ns.number,
                                                  ns.stop)
            # NOTE(mkoderer): we just save the last result code
            if (step_result != 0):
                result = step_result
                if ns.stop:
                    return result
    else:
        result = driver.stress_openstack(tests,
                                         ns.duration,
                                         ns.number,
                                         ns.stop)
    return result
コード例 #2
0
ファイル: run_stress.py プロジェクト: overcastcloud/tempest
def main():
    ns = parser.parse_args()
    result = 0
    if not ns.all:
        tests = json.load(open(ns.tests, 'r'))
    else:
        tests = discover_stress_tests(filter_attr=ns.type,
                                      call_inherited=ns.call_inherited)

    if ns.serial:
        # Duration is total time
        duration = ns.duration / len(tests)
        for test in tests:
            step_result = driver.stress_openstack([test],
                                                  duration,
                                                  ns.number,
                                                  ns.stop)
            # NOTE(mkoderer): we just save the last result code
            if (step_result != 0):
                result = step_result
                if ns.stop:
                    return result
    else:
        result = driver.stress_openstack(tests,
                                         ns.duration,
                                         ns.number,
                                         ns.stop)
    return result
コード例 #3
0
ファイル: run_stress.py プロジェクト: adamancy22/tempest
def main(ns):
    tests = json.load(open(ns.tests, 'r'))
    if ns.serial:
        for test in tests:
            driver.stress_openstack([test], ns.duration)
    else:
        driver.stress_openstack(tests, ns.duration)
コード例 #4
0
ファイル: run_stress.py プロジェクト: medardus/tempest
def action(ns):
    result = 0
    if not ns.all:
        tests = json.load(open(ns.tests, 'r'))
    else:
        tests = discover_stress_tests(filter_attr=ns.type,
                                      call_inherited=ns.call_inherited)

    if ns.serial:
        # Duration is total time
        duration = ns.duration / len(tests)
        for test in tests:
            step_result = driver.stress_openstack([test],
                                                  duration,
                                                  ns.number,
                                                  ns.stop)
            # NOTE(mkoderer): we just save the last result code
            if (step_result != 0):
                result = step_result
                if ns.stop:
                    return result
    else:
        result = driver.stress_openstack(tests,
                                         ns.duration,
                                         ns.number,
                                         ns.stop)
    return result
コード例 #5
0
def main(ns):
    # NOTE(mkoderer): moved import to make "-h" possible without OpenStack
    from tempest.stress import driver
    result = 0
    tests = json.load(open(ns.tests, 'r'))
    if ns.serial:
        for test in tests:
            step_result = driver.stress_openstack([test], ns.duration,
                                                  ns.number, ns.stop)
            # NOTE(mkoderer): we just save the last result code
            if (step_result != 0):
                result = step_result
    else:
        driver.stress_openstack(tests, ns.duration, ns.number, ns.stop)
    return result
コード例 #6
0
ファイル: run_stress.py プロジェクト: john5223/tempest
def main(ns):
    # NOTE(kodererm): moved import to make "-h" possible without OpenStack
    from tempest.stress import driver

    result = 0
    tests = json.load(open(ns.tests, "r"))
    if ns.serial:
        for test in tests:
            step_result = driver.stress_openstack([test], ns.duration, ns.number)
            # NOTE(kodererm): we just save the last result code
            if step_result != 0:
                result = step_result
    else:
        driver.stress_openstack(tests, ns.duration, ns.number)
    return result
コード例 #7
0
ファイル: run_stress.py プロジェクト: rossella/tempest
def main(ns):
    # NOTE(mkoderer): moved import to make "-h" possible without OpenStack
    from tempest.stress import driver

    result = 0
    if not ns.all:
        tests = json.load(open(ns.tests, "r"))
    else:
        tests = discover_stress_tests(filter_attr=ns.type, call_inherited=ns.call_inherited)

    if ns.serial:
        for test in tests:
            step_result = driver.stress_openstack([test], ns.duration, ns.number, ns.stop)
            # NOTE(mkoderer): we just save the last result code
            if step_result != 0:
                result = step_result
    else:
        driver.stress_openstack(tests, ns.duration, ns.number, ns.stop)
    return result
コード例 #8
0
ファイル: run_stress.py プロジェクト: scottchoi/tempest
def main(ns):
    # NOTE(mkoderer): moved import to make "-h" possible without OpenStack
    from tempest.stress import driver
    result = 0
    if not ns.all:
        tests = json.load(open(ns.tests, 'r'))
    else:
        tests = discover_stress_tests(filter_attr=ns.type,
                                      call_inherited=ns.call_inherited)

    if ns.serial:
        for test in tests:
            step_result = driver.stress_openstack([test],
                                                  ns.duration,
                                                  ns.number,
                                                  ns.stop)
            # NOTE(mkoderer): we just save the last result code
            if (step_result != 0):
                result = step_result
    else:
        driver.stress_openstack(tests, ns.duration, ns.number, ns.stop)
    return result
コード例 #9
0
ファイル: run_stress.py プロジェクト: SinSiXX/tempest
def main(ns):
    tests = json.load(open(ns.tests, 'r'))
    driver.stress_openstack(tests, ns.duration)
コード例 #10
0
def main(ns):
    tests = json.load(open(ns.tests, 'r'))
    driver.stress_openstack(tests, ns.duration)