mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
domain: Handle PMSUSPENDED status
And add a catchall https://bugzilla.redhat.com/show_bug.cgi?id=850954
This commit is contained in:
parent
c25ea739b9
commit
63ba65d374
@ -1371,19 +1371,25 @@ class vmmDomain(vmmLibvirtObject):
|
|||||||
self.vcpu_max_count()
|
self.vcpu_max_count()
|
||||||
|
|
||||||
def run_status(self):
|
def run_status(self):
|
||||||
if self.status() == libvirt.VIR_DOMAIN_RUNNING:
|
status = self.status()
|
||||||
|
|
||||||
|
if status == libvirt.VIR_DOMAIN_RUNNING:
|
||||||
return _("Running")
|
return _("Running")
|
||||||
elif self.status() == libvirt.VIR_DOMAIN_PAUSED:
|
elif status == libvirt.VIR_DOMAIN_PAUSED:
|
||||||
return _("Paused")
|
return _("Paused")
|
||||||
elif self.status() == libvirt.VIR_DOMAIN_SHUTDOWN:
|
elif status == libvirt.VIR_DOMAIN_SHUTDOWN:
|
||||||
return _("Shutting Down")
|
return _("Shutting Down")
|
||||||
elif self.status() == libvirt.VIR_DOMAIN_SHUTOFF:
|
elif status == libvirt.VIR_DOMAIN_SHUTOFF:
|
||||||
if self.hasSavedImage():
|
if self.hasSavedImage():
|
||||||
return _("Saved")
|
return _("Saved")
|
||||||
else:
|
else:
|
||||||
return _("Shutoff")
|
return _("Shutoff")
|
||||||
elif self.status() == libvirt.VIR_DOMAIN_CRASHED:
|
elif status == libvirt.VIR_DOMAIN_CRASHED:
|
||||||
return _("Crashed")
|
return _("Crashed")
|
||||||
|
elif (hasattr(libvirt, "VIR_DOMAIN_PMSUSPENDED") and
|
||||||
|
status == libvirt.VIR_DOMAIN_PMSUSPENDED):
|
||||||
|
return _("Suspended")
|
||||||
|
return _("Unknown")
|
||||||
|
|
||||||
def _normalize_status(self, status):
|
def _normalize_status(self, status):
|
||||||
if status == libvirt.VIR_DOMAIN_NOSTATE:
|
if status == libvirt.VIR_DOMAIN_NOSTATE:
|
||||||
|
Loading…
Reference in New Issue
Block a user