Exemplo n.º 1
0
    def _migrate_progress(self, vm):
        info = vm.command("query-migrate")

        if "ram" not in info:
            info["ram"] = {}

        return Progress(
            info.get("status", "active"),
            ProgressStats(info["ram"].get("transferred",
                                          0), info["ram"].get("remaining", 0),
                          info["ram"].get("total",
                                          0), info["ram"].get("duplicate", 0),
                          info["ram"].get("skipped",
                                          0), info["ram"].get("normal", 0),
                          info["ram"].get("normal-bytes", 0),
                          info["ram"].get("dirty-pages-rate",
                                          0), info["ram"].get("mbps", 0),
                          info["ram"].get("dirty-sync-count", 0)),
            time.time(),
            info.get("total-time", 0),
            info.get("downtime", 0),
            info.get("expected-downtime", 0),
            info.get("setup-time", 0),
            info.get("x-cpu-throttle-percentage", 0),
        )
Exemplo n.º 2
0
 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"])
Exemplo n.º 3
0
Arquivo: report.py Projeto: 8tab/qemu
 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"])