Beispiel #1
0
def create_transport_test(EXPECT, trtype, b, n):
    nvmf = nvmf_common.Nvmf("[ Create Transport ", EXPECT, spdk_rpc_path)
    common_test_lib.start_ibofos(args.log_path, ibof_root)

    ret = nvmf.create_transport(trtype, b, n)

    common_test_lib.expect_true(ret, "Transport Creation")
    common_test_lib.terminate_ibofos(ibof_root, stdout_type)
    success = (EXPECT == ret)
    common_test_lib.print_result("[ Create Transport Test ]", success)
    return success
Beispiel #2
0
def create_subsystem_test(EXPECT, nqn, serial_num, model_num, max_ns,
                          allow_any_host):
    nvmf = nvmf_common.Nvmf("[ Create Subsystem ", EXPECT, spdk_rpc_path)
    common_test_lib.start_ibofos(args.log_path, ibof_root)

    ret = nvmf.create_subsystem(nqn, serial_num, model_num, max_ns,
                                allow_any_host)

    common_test_lib.expect_true(ret, "Subsystem Creation")
    common_test_lib.terminate_ibofos(ibof_root, stdout_type)
    success = (EXPECT == ret)
    common_test_lib.print_result("[ Create Subsystem Test ]", success)
    return success
Beispiel #3
0
def delete_subsystem_test(EXPECT, nqn, allow_any_host):
    nvmf = nvmf_common.Nvmf("[ Delete Subsystem ", EXPECT, spdk_rpc_path)
    common_test_lib.start_ibofos(args.log_path, ibof_root)

    ret = nvmf.create_subsystem("nqn.2019-04.ibof:subsystem1",\
            "IBOF00000000000001","IBOF_VOLUME_EXTENTION", "256", allow_any_host)
    common_test_lib.expect_true(ret, "Subsystem Creation")

    ret = nvmf.delete_subsystem(nqn)

    common_test_lib.expect_true(ret, "Subsystem Deletion")
    common_test_lib.terminate_ibofos(ibof_root, stdout_type)
    success = (EXPECT == ret)
    common_test_lib.print_result("[ Delete Subsystem Test ]", success)
    return success
Beispiel #4
0
def add_subsystem_listener_test(EXPECT, nqn, trtype, traddr, trsvid,
                                allow_any_host):
    nvmf = nvmf_common.Nvmf("[ Add Subsystem Listener ", EXPECT, spdk_rpc_path)
    common_test_lib.start_ibofos(args.log_path, ibof_root)

    ret = nvmf.create_transport(trtype, "64", "2048")
    common_test_lib.expect_true(ret, "Transport Creation")

    ret = nvmf.create_subsystem("nqn.2019-04.ibof:subsystem1",\
            "IBOF00000000000001","IBOF_VOLUME_EXTENTION", "256", allow_any_host)
    common_test_lib.expect_true(ret, "Subsystem Creation")

    ret = nvmf.add_subsystem_listener(nqn, trtype, traddr, trsvid)

    common_test_lib.expect_true(ret, "Subsystem Listener Added")
    common_test_lib.terminate_ibofos(ibof_root, stdout_type)
    success = (EXPECT == ret)
    common_test_lib.print_result("[ Add Subsystem Listener Test ]", success)
    return success