예제 #1
0
def scan_dev():
    write_log("scan_dev begin")
    ibofos_util.pci_rescan()
    time.sleep(2)
    cli.scan_device()
    cli.list_device()
    write_log("scan_dev done")
예제 #2
0
def execute():
    clear_result()
    ibofos_util.pci_rescan()
    MOUNT_VOL_BASIC_1.execute()
    ibofos_util.pci_detach(DETACH_TARGET_DATA)
    ibofos_util.pci_detach(DETACH_TARGET_SPARE)
    time.sleep(0.1)
예제 #3
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
예제 #4
0
def execute():
    clear_result()
    ibofos_util.pci_rescan()
    MOUNT_VOL_BASIC_1.execute()
    ibofos_util.pci_detach_and_attach(DETACH_TARGET_DATA)
    time.sleep(6)  #TO TRIGGER REBUILD
    ibofos_util.pci_detach_and_attach(DETACH_TARGET_SPARE)
    time.sleep(3)
    print(cli.list_device())
    out = cli.add_device(NEW_SPARE, "")
예제 #5
0
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
예제 #6
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
예제 #7
0
    code = json_parser.get_response_code(detail)
    if code == 0:
        result, out = check_result()
    else:
        result = "fail"
        out = detail

    with open(__file__ + ".result", "w") as result_file:
        result_file.write(result + " (" + str(code) + ")" + "\n" + out)

def execute():
    clear_result()
    DETACH_DEV_DATA_DEGRADED_IO.execute()
    out = cli.add_device(NEW_SPARE, "")
    rebuild_started = False
    while True:
        out = cli.get_ibofos_info()
        if out.find("REBUILDING") == -1 and rebuild_started == True:
            print ("rebuilding done")
            break
        elif rebuild_started == False and out.find("REBUILDING") >= 0:
            print ("rebuilding started")
            rebuild_started = True
        time.sleep(1)

if __name__ == "__main__":
    execute()
    set_result()
    ibofos.kill_ibofos()
    ibofos_util.pci_rescan()
예제 #8
0
def clear_env():
    ibofos_util.pci_rescan()
    common_test_lib.clear_env()
    subprocess.call("rm /dev/shm/* -rf", shell="True")