domcapabilities: fix CPUModel usable attribute
It is not True/False attribute, it can contain 'unknown' value as well which means libvirt cannot figure out whether the CPU model is usable with that specific QEMU binary. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
f7bdebc0de
commit
8183ba279c
|
@ -239,7 +239,7 @@ class DomainCpu(XMLBuilder):
|
|||
return
|
||||
|
||||
cpu_model = domcaps_mode.get_model(self.model)
|
||||
if cpu_model and cpu_model.usable:
|
||||
if cpu_model and cpu_model.usable != "no":
|
||||
return
|
||||
|
||||
logging.debug("Host capabilities CPU '%s' is not supported "
|
||||
|
|
|
@ -94,7 +94,7 @@ class _Features(_CapsBlock):
|
|||
class _CPUModel(XMLBuilder):
|
||||
XML_NAME = "model"
|
||||
model = XMLProperty(".")
|
||||
usable = XMLProperty("./@usable", is_yesno=True)
|
||||
usable = XMLProperty("./@usable")
|
||||
fallback = XMLProperty("./@fallback")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue