def deserialize(cls, data): return cls(Hardware.deserialize(data["hardware"]), Scenario.deserialize(data["scenario"]), [ Progress.deserialize(record) for record in data["progress_history"] ], Timings.deserialize(data["guest_timings"]), Timings.deserialize(data["qemu_timings"]), Timings.deserialize(data["vcpu_timings"]), data["binary"], data["dst_host"], data["kernel"], data["initrd"], data["transport"], data["sleep"])
def deserialize(cls, data): return cls( Hardware.deserialize(data["hardware"]), Scenario.deserialize(data["scenario"]), [Progress.deserialize(record) for record in data["progress_history"]], Timings.deserialize(data["guest_timings"]), Timings.deserialize(data["qemu_timings"]), Timings.deserialize(data["vcpu_timings"]), data["binary"], data["dst_host"], data["kernel"], data["initrd"], data["transport"], data["sleep"])
def get_hardware(self, args): def split_map(value): if value == "": return [] return value.split(",") return Hardware(cpus=args.cpus, mem=args.mem, src_cpu_bind=split_map(args.src_cpu_bind), src_mem_bind=split_map(args.src_mem_bind), dst_cpu_bind=split_map(args.dst_cpu_bind), dst_mem_bind=split_map(args.dst_mem_bind), locked_pages=args.locked_pages, huge_pages=args.huge_pages, prealloc_pages=args.prealloc_pages)