Beispiel #1
0
def umnmount_vol(vol_name):
    out = cli.unmount_volume(vol_name, ARRAYNAME)
    code = json_parser.get_response_code(out)
    if code == 0:
        global MOUNTED_VOL_CNT
        MOUNTED_VOL_CNT = MOUNTED_VOL_CNT - 1
        write_log("volume: " + vol_name + " unmounted successfully")
        return True
    else:
        write_log("volume: " + vol_name + " unmounting failed, code: " +
                  str(code))
        return False
def unmount_volume(volumeId):
    out = cli.unmount_volume("vol" + str(volumeId), "")
    ret = json_parser.get_response_code(out)
    if ret != 0:
        TEST_LOG.print_err("Failed to unmount volume")
        TEST_LOG.print_debug(out)
        sys.exit(1)

    out = spdk_rpc.send_request("nvmf_subsystem_remove_listener " + TEST.NQN + str(volumeId) \
        + " -t " + TEST.trtype + " -a " + str(TEST.traddr) + " -s " + str(TEST.port))
    if out != 0:
        TEST_LOG.print_err("Failed to unmount volume")
        TEST_LOG.print_debug(out)
        sys.exit(1)

    TEST_LOG.print_info("* Volume {} unmounted".format(volumeId))
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    out = cli.unmount_volume(VOL_NAME, "wrong_array_name")
    return out
Beispiel #4
0
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    wrong_name = "wrong_vol"
    out = cli.unmount_volume(wrong_name, "")
    return out
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    out = cli.unmount_volume(MOUNT_VOL_BASIC_1.VOL_NAME, ARRAYNAME)
    out = cli.unmount_volume(MOUNT_VOL_BASIC_1.VOL_NAME, ARRAYNAME)
    return out