def execute(): clear_result() MOUNT_ARRAY_BASIC.execute() pos_util.pci_detach(MOUNT_ARRAY_BASIC.ANY_DATA) time.sleep(0.5) print(cli.list_device()) pos_util.pci_detach(MOUNT_ARRAY_BASIC.ANY_OTHER_DATA) out = cli.unmount_array(ARRAYNAME) print (out) cur_info = json.loads(cli.array_info(ARRAYNAME)) 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_array(ARRAYNAME) print (out) return out
def execute(): clear_result() MOUNT_VOL_BASIC_1.execute() out = cli.array_info(ARRAYNAME) used = json_parser.get_used(out) cli.unmount_array(MOUNT_VOL_BASIC_1.ARRAYNAME) cli.mount_array(MOUNT_VOL_BASIC_1.ARRAYNAME) return used
def unmount_all_arrays(): arraylist = get_mounted_arrays() for array in arraylist: cli.unmount_array(array) arraylist = get_mounted_arrays() if len(arraylist) == 0: return True return False
def execute(): ADD_SPARE_BASIC.execute() cli.unmount_array(ADD_SPARE_BASIC.ARRAYNAME) pos.exit_pos() pos.start_pos() cli.scan_device() cli.mount_array(ADD_SPARE_BASIC.ARRAYNAME) out = cli.array_info(ADD_SPARE_BASIC.ARRAYNAME) return out
def execute(): clear_result() CREATE_VOL_BASIC_1.execute() CREATE_VOL_BASIC_2.execute() CREATE_VOL_BASIC_3.execute() cli.unmount_array(ARRAYNAME) pos.exit_pos() pos.start_pos() cli.scan_device() cli.mount_array(ARRAYNAME)
def execute(): MOUNT_ARRAY_NO_SPARE.execute() pos_util.pci_detach(MOUNT_ARRAY_NO_SPARE.DATA_DEV_1) time.sleep(0.1) cli.unmount_array(MOUNT_ARRAY_NO_SPARE.ARRAYNAME) pos.exit_pos() time.sleep(5) pos.start_pos() cli.scan_device() out = cli.mount_array(MOUNT_ARRAY_NO_SPARE.ARRAYNAME) return out
def execute(): MOUNT_ARRAY_BASIC.execute() spare = MOUNT_ARRAY_BASIC.SPARE pos_util.pci_detach(spare) time.sleep(0.1) cli.unmount_array(ARRAYNAME) pos.exit_pos() time.sleep(5) pos.start_pos() cli.scan_device() out = cli.mount_array(ARRAYNAME) return out
def execute(): pos_util.pci_rescan() out = CREATE_ARRAY_NO_SPARE.execute() print (out) out = cli.mount_array(ARRAYNAME) print (out) pos_util.pci_detach(CREATE_ARRAY_NO_SPARE.DATA_DEV_1) time.sleep(2) pos_util.pci_detach(CREATE_ARRAY_NO_SPARE.DATA_DEV_2) time.sleep(2) out = cli.unmount_array(ARRAYNAME) print (out) out = cli.delete_array(ARRAYNAME) print (out) pos.exit_pos() pos_util.pci_rescan() pos.start_pos() cli.scan_device() cli.list_device() out = cli.create_array("uram0", DATA, SPARE, ARRAYNAME, "RAID5") print (out) out = cli.mount_array(ARRAYNAME) print (out) return out
def execute(): MOUNT_VOL_BASIC_1.execute() fio_proc = fio.start_fio(0, 60) time.sleep(5) out = cli.unmount_array(ARRAYNAME) fio.stop_fio(fio_proc) return out
def unmount_array(arrayId): out = cli.unmount_array(get_arrayname(arrayId)) ret = json_parser.get_response_code(out) if ret != 0: TEST_LOG.print_err("Failed to unmount array{}".format(arrayId)) TEST_LOG.print_debug(out) sys.exit(1) TEST_LOG.print_info("* {} unmounted".format(get_arrayname(arrayId)))
def unmount_pos(): out = cli.unmount_array(ARRAYNAME) 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
def execute(): STATE_BUSY_TO_STOP.execute() out = cli.unmount_array(ARRAYNAME) return out
def execute(): MOUNT_VOL_BASIC_1.execute() out = cli.unmount_array(MOUNT_VOL_BASIC_1.ARRAYNAME) return out
def execute(): MOUNT_ARRAY_DEGRADED_BASIC.execute() out = cli.unmount_array(ARRAYNAME) return out
def execute(): CREATE_ARRAY_BASIC.execute() out = cli.unmount_array(CREATE_ARRAY_BASIC.ARRAYNAME) return out
def execute(): clear_result() MOUNT_VOL_BASIC_1.execute() cli.unmount_array(ARRAYNAME) out = cli.rename_volume(NAME, NEW_NAME, ARRAYNAME) return out
def execute(): clear_result() CREATE_VOL_BASIC_1.execute() cli.unmount_array(ARRAYNAME) out = cli.mount_volume(CREATE_VOL_BASIC_1.VOL_NAME, ARRAYNAME, "") return out
def execute(): MOUNT_ARRAY_BASIC.execute() pos_util.pci_detach(MOUNT_ARRAY_BASIC.ANY_DATA) time.sleep(5) out = cli.unmount_array(ARRAYNAME) return out
def execute(): START_POS_BASIC.execute() out = cli.unmount_array("POSArray") return out