[virt-tools-list] [PATCH virt-manager 1/2] virtManager: read the reason for the domain state
Giuseppe Scrivano
gscrivan at redhat.com
Wed Mar 19 10:53:34 UTC 2014
Cole Robinson <crobinso at redhat.com> writes:
>> - def _update_status(self, status):
>> + def _update_status(self, info):
>> """
>> Internal helper to change cached status to 'status' and signal
>> clients if we actually changed state
>> """
>> - status = self._normalize_status(status)
>> + status = self._normalize_status(info[0])
>>
>> if status == self.lastStatus:
>> return
>>
>> oldstatus = self.lastStatus
>> self.lastStatus = status
>> + self.lastStatusReason = info[3]
>>
>
> Huh? virDomainGetInfo returns the status reason? Or am I misreading things?
>
> According to libvirt.h, info[3] should be the number of CPUs allocated to the VM.
ops, I misread the documentation, I will send a v2 soon.
Giuseppe
More information about the virt-tools-list
mailing list