cpu: Drop vendor and features if setting host-model (bz 1190851)

Otherwise via virt-manager we can try to set a <cpu> with a <vendor>
but no <model>, and libvirt complains.
This commit is contained in:
Cole Robinson
2015-03-26 17:08:15 -04:00
parent 2c9d2a2360
commit dc1737e623
3 changed files with 7 additions and 1 deletions

View File

@@ -251,6 +251,7 @@ class XMLParseTest(unittest.TestCase):
check = self._make_checker(guest.cpu)
check("model", None, "foobar")
check("model_fallback", None, "allow")
check("cores", None, 4)
guest.cpu.add_feature("x2apic", "forbid")
guest.cpu.set_topology_defaults(guest.vcpus)