in fiosynth_lib/fiosynth.py [0:0]
def loadDevList(dut_list, args, profile):
prefix = "lsblk -bno SIZE "
suffix = " | head -n 1"
command = args.device
if (command == "ALL") or (command == "ALLRAID"):
for dut in dut_list:
cmd = None
devices = drivesToJson(dut)
data = json.loads(devices)
dut.dev_list = getAllDataDrives(data, command, profile, dut)
devs = None
if command == "ALL":
devs = data["disk"]
else:
devs = data[getRaidLevel(data)]
for dev in devs:
if checkFileExist(dev, dut) and not checkMounted(dev, dut):
cmd = prefix + dev + suffix
setDutCapacity(dut, cmd, profile)
dut.numjobs = getNumJobs(data, command, dut)
else:
devs = command.split(":")
ndevs = len(devs)
for dut in dut_list:
for dev in devs:
cmd = None
if checkFileExist(dev, dut) and not checkMounted(dev, dut):
cmd = prefix + dev + suffix
if profile["devices_in_global"] == "N":
dut.dev_list += "[%s]\n" % dev
dut.dev_list += "filename=%s\n" % dev
setDutCapacity(dut, cmd, profile)
dut.device = command
dut.numjobs = ndevs