Update libvirt cpu config builder
Closes-Bug: 1485047 Change-Id: I6dd7e2b99cae68bc32e71d82bd23c33e6bf7495e
This commit is contained in:
parent
210cd9bf37
commit
22d64bd96a
|
@ -166,8 +166,7 @@ class LibvirtXMLBuilder(object):
|
|||
self._get_name(node.environment and node.environment.name or '',
|
||||
node.name))
|
||||
if self.driver.use_host_cpu:
|
||||
with node_xml.cpu(mode='host-model'):
|
||||
node_xml.model(fallback='forbid')
|
||||
node_xml.cpu(mode='host-passthrough')
|
||||
node_xml.vcpu(str(node.vcpu))
|
||||
node_xml.memory(str(node.memory * 1024), unit='KiB')
|
||||
|
||||
|
|
|
@ -255,9 +255,7 @@ class TestNodeXml(BaseTestXMLBuilder):
|
|||
expected = '''
|
||||
<domain type="test_hypervisor">
|
||||
<name>test_env_name_test_name</name>
|
||||
<cpu mode="host-model">
|
||||
<model fallback="forbid" />
|
||||
</cpu>
|
||||
<cpu mode="host-passthrough" />
|
||||
<vcpu>{0}</vcpu>
|
||||
<memory unit="KiB">{1}</memory>
|
||||
<clock offset="utc" />
|
||||
|
|
Loading…
Reference in New Issue