in fiosynth_lib/fiosynth.py [0:0]
def setDutCapacity(dut, cmd, profile):
if not cmd:
if not dut.inLocalMode():
host = " on %s" % dut.serverName
else:
host = ""
sys.exit("No devices available or device is mounted%s." % host)
if profile["devices_in_global"] != "N":
dut.device = dut.dev_list
if not dut.inLocalMode():
dutSsh = getSshProc(dut)
out, err = dutSsh.communicate(cmd)
dut.capacity = out.strip()
else:
# set capacity to the smallest device under test
capacity = cmdline(cmd)
if (int(capacity) < int(dut.capacity)) or (int(dut.capacity) == 0):
dut.capacity = capacity