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")
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")
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")
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", )
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")