예제 #1
0
    def forceCallback(self):
        self.vm.log.debug("Shutting down with FORCE")
        self.vm.doDestroy()

        return utils.log_success(self.event.wait(self.timeout), self.vm.log,
                                 "Shutting down with FORCE succeeded",
                                 "Shutting down with FORCE timed out")
예제 #2
0
 def ovirtGuestAgentCallback(self):
     self.vm.log.debug("Shutting down with oVirt agent")
     self.vm.guestAgent.desktopShutdown(self.delay, self.message, False)
     return utils.log_success(self.event.wait(self.delay + self.timeout),
                              self.vm.log,
                              "Shutting down with oVirt agent succeeded",
                              "Shutting down with oVirt agent timed out")
예제 #3
0
    def acpiCallback(self):
        self.vm.log.debug("Rebooting with ACPI")
        if response.is_error(self.vm.acpiReboot()):
            self.vm.log.warn("Rebooting with ACPI FAILED")
            return False

        return utils.log_success(self.event.wait(self.timeout), self.vm.log,
                                 "Rebooting with ACPI succeeded",
                                 "Rebooting with ACPI timed out")
예제 #4
0
    def forceCallback(self):
        # TODO: fix like acpiShutdown
        self.vm.log.debug("Rebooting with force")
        self.vm._dom.reset(0)

        return utils.log_success(
            self.event.wait(self.timeout),
            self.vm.log,
            "Rebooting with force succeeded",
            "Rebooting with force timed out",
        )
예제 #5
0
    def qemuGuestAgentCallback(self):
        # TODO: QEMU GA does not support setting delay for reboot right
        #       now, but it may get this functionality in the future. When
        #       the feature is implemented in the future it should be also
        #       added here.
        self.vm.log.debug("Rebooting with guest agent")
        try:
            self.vm.qemuGuestAgentReboot()
        except exception.VdsmException:
            self.vm.log.warn("Rebooting with guest agent FAILED")
            return False

        return utils.log_success(self.event.wait(self.timeout), self.vm.log,
                                 "Shutting down with FORCE succeeded",
                                 "Shutting down with FORCE timed out")