Example #1
0
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    ibofos_util.pci_detach(MOUNT_ARRAY_BASIC_1.ANY_DATA)
    time.sleep(0.5)
    print(cli.list_device())
    ibofos_util.pci_detach(MOUNT_ARRAY_BASIC_1.ANY_OTHER_DATA)

    out = cli.unmount_ibofos()
    print(out)

    cur_info = json.loads(cli.array_info(""))
    cur_state = cur_info['Response']['info']['situation']
    print(cur_state)
    if cur_state != 'FAULT':
        print("STOP State is not triggered, try again")
        return cur_info
    wait_time = 20
    for i in reversed(range(wait_time)):
        print("Wait to cancel rebuild " + str(i) + " seconds left")
        time.sleep(1)

    out = cli.unmount_ibofos()
    print(out)
    return out
Example #2
0
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    cli.unmount_ibofos()
    cli.delete_array("")
    cli.create_array("uram0", DATA, SPARE, "", "")
    cli.mount_ibofos()
    out = cli.get_ibofos_info()

    return out
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    out = cli.get_ibofos_info()
    print(out)
    data = json.loads(out)
    used = data['Response']['result']['data']['used']
    cli.unmount_ibofos()
    cli.mount_ibofos()
    return used
Example #4
0
def execute():
    clear_result()
    ADD_DEV_BASIC_1.execute()
    cli.unmount_ibofos()
    ibofos.exit_ibofos()
    ibofos.start_ibofos()
    cli.scan_device()
    cli.load_array("")
    cli.mount_ibofos()
    out = cli.array_info("")
    return out
Example #5
0
def execute():
    clear_result()
    CREATE_VOL_BASIC_1.execute()
    CREATE_VOL_BASIC_2.execute()
    CREATE_VOL_BASIC_3.execute()
    cli.unmount_ibofos()
    ibofos.exit_ibofos()
    ibofos.start_ibofos()
    cli.scan_device()
    cli.load_array("")
    cli.mount_ibofos()
def execute():
    clear_result()
    CREATE_ARRAY_NO_SPARE.execute()
    out = cli.mount_ibofos()
    ibofos_util.pci_detach(CREATE_ARRAY_NO_SPARE.DATA_DEV_1)
    time.sleep(0.1)
    cli.unmount_ibofos()
    ibofos.exit_ibofos()
    ibofos.start_ibofos()
    cli.scan_device()
    cli.load_array("")
    out = cli.mount_ibofos()
    return out
def execute():
    clear_result()
    ibofos_util.pci_rescan()
    MOUNT_VOL_NO_SPARE.execute()
    ibofos_util.pci_detach("unvme-ns-0")
    print ("unvme-ns-0 has been detached")
    time.sleep(3)
    ibofos_util.pci_detach("unvme-ns-1")
    print ("unvme-ns-1 has been detached")
    time.sleep(3)
    cli.unmount_ibofos()
    out = ibofos.exit_ibofos()
    return out
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    spare = MOUNT_ARRAY_BASIC_1.SPARE
    ibofos_util.pci_detach(spare)
    time.sleep(0.1)
    cli.unmount_ibofos()
    ibofos.exit_ibofos()
    ibofos.start_ibofos()
    cli.scan_device()
    cli.load_array("")
    out = cli.mount_ibofos()
    return out
Example #9
0
def execute():
    clear_result()
    ibofos_util.pci_rescan()
    out = CREATE_ARRAY_NO_SPARE.execute()
    print(out)
    out = cli.mount_ibofos()
    print(out)
    ibofos_util.pci_detach_and_attach(CREATE_ARRAY_NO_SPARE.DATA_DEV_1)
    time.sleep(2)
    ibofos_util.pci_detach_and_attach(CREATE_ARRAY_NO_SPARE.DATA_DEV_2)
    time.sleep(2)
    out = cli.unmount_ibofos()
    print(out)
    out = cli.delete_array("")
    print(out)
    ibofos_util.pci_rescan()
    ibofos.start_ibofos()
    cli.scan_device()
    cli.list_device()
    out = cli.create_array("uram0", DATA, SPARE, ARRAY_NAME, "")
    print(out)
    out = cli.mount_ibofos()
    print(out)

    return out
Example #10
0
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    fio_proc = fio.start_fio(0, 60)
    time.sleep(2)
    out = cli.unmount_ibofos()
    fio.stop_fio(fio_proc)
    return out
Example #11
0
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    ibofos_util.pci_detach(MOUNT_ARRAY_BASIC_1.ANY_DATA)
    time.sleep(0.1)
    out = cli.unmount_ibofos()
    print(out)
    return out
Example #12
0
def unmount_ibofos():
    out = cli.unmount_ibofos()
    code = json_parser.get_response_code(out)
    if code == 0:
        write_log("array unmounted successfully")
        return True
    else:
        write_log("array unmounting failed code: " + str(code))
        return False
Example #13
0
def execute():
    clear_result()
    out = CREATE_ARRAY_BASIC_1.execute()
    ret = json_parser.get_response_code(out)
    if ret == 0:
        out = cli.mount_ibofos()
        ret = json_parser.get_response_code(out)
        if ret == 0:
            out = cli.unmount_ibofos()
            ret = json_parser.get_response_code(out)
            if ret == 0:
                out = cli.delete_array("")
    return out
Example #14
0
def execute():
    clear_result()
    ibofos_util.pci_rescan()
    out = CREATE_ARRAY_NO_SPARE.execute()
    print(out)
    out = cli.mount_ibofos()
    print(out)
    ibofos_util.pci_detach(CREATE_ARRAY_NO_SPARE.DATA_DEV_1)
    time.sleep(2)
    ibofos_util.pci_detach(CREATE_ARRAY_NO_SPARE.DATA_DEV_2)
    time.sleep(2)
    out = cli.unmount_ibofos()
    print(out)
    return out
def shutdown_ibofos():
    global isIbofExecuted
    global ibof_proc
    
    TEST_LOG.print_info("* Exiting POS")
    out = cli.unmount_ibofos()
    ret = json_parser.get_response_code(out)
    if ret != 0:
        TEST_LOG.print_err("Failed to unmount ibofos")
        TEST_LOG.print_debug(out)
        sys.exit(1)
    out = cli.exit_ibofos()
    ret = json_parser.get_response_code(out)
    if ret != 0:
        TEST_LOG.print_err("Failed to exit ibofos")
        TEST_LOG.print_debug(out)
        sys.exit(1)

    ibof_proc.wait()
    isIbofExecuted = False
def execute():
    clear_result()
    ibofos.start_ibofos()
    out = cli.unmount_ibofos()
    return out
Example #17
0
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    cli.unmount_ibofos()
    out = ibofos.exit_ibofos()
    return out
def execute():
    clear_result()
    MOUNT_VOL_BASIC_1.execute()
    cli.unmount_ibofos()
    out = cli.rename_volume(NAME, NEW_NAME, "")
    return out
def execute():
    clear_result()
    CREATE_VOL_BASIC_1.execute()
    cli.unmount_ibofos()
    out = cli.list_volume("")
    return out
Example #20
0
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    out = cli.unmount_ibofos()
    return out
Example #21
0
def execute():
    clear_result()
    MOUNT_ARRAY_BASIC_1.execute()
    ibofos_util.pci_detach(MOUNT_ARRAY_BASIC_1.ANY_DATA)
    out = cli.unmount_ibofos()
    return out
def execute():
    clear_result()
    STATE_BUSY_TO_STOP.execute()
    out = cli.unmount_ibofos()
    return out