cli: Add --numatune memory.placement

XML Mapping:

<numatune>
  ...
  <memory placement=X/>
  ...
</numatune>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Athina Plaskasoviti 2019-06-09 11:48:08 +03:00 committed by Cole Robinson
parent 578451fe72
commit 7a52e4c80d
3 changed files with 4 additions and 2 deletions

View File

@ -1055,7 +1055,7 @@ c.add_compare("--qemu-commandline='-foo bar,baz=\"wib wob\"'", "edit-simple-qemu
c.add_compare("--memory 500,maxmemory=1000,hugepages=off", "edit-simple-memory")
c.add_compare("--vcpus 10,maxvcpus=20,cores=5,sockets=4,threads=1", "edit-simple-vcpus")
c.add_compare("--cpu model=pentium2,+x2apic,forbid=pbe", "edit-simple-cpu")
c.add_compare("--numatune memory.nodeset=1-5,7,memory.mode=strict", "edit-simple-numatune")
c.add_compare("--numatune memory.nodeset=1-5,7,memory.mode=strict,memory.placement=auto", "edit-simple-numatune")
c.add_compare("--blkiotune weight=500,device_path=/dev/sdf,device_weight=600", "edit-simple-blkiotune")
c.add_compare("--idmap uid_start=0,uid_target=2000,uid_count=30,gid_start=0,gid_target=3000,gid_count=40", "edit-simple-idmap")
c.add_compare("--boot loader=foo.bar,useserial=on,init=/bin/bash,nvram=/test/nvram.img,os_type=hvm,domain_type=test,loader.readonly=on,loader.secure=no,machine=", "edit-simple-boot")

View File

@ -1703,6 +1703,7 @@ class ParserNumatune(VirtCLIParser):
VirtCLIParser._init_class(**kwargs)
cls.add_arg("memory.nodeset", "memory_nodeset", can_comma=True)
cls.add_arg("memory.mode", "memory_mode")
cls.add_arg("memory.placement", "memory_placement")
####################

View File

@ -12,7 +12,8 @@ class DomainNumatune(XMLBuilder):
Class for generating <numatune> XML
"""
XML_NAME = "numatune"
_XML_PROP_ORDER = ["memory_mode", "memory_nodeset"]
_XML_PROP_ORDER = ["memory_mode", "memory_nodeset", "memory_placement"]
memory_nodeset = XMLProperty("./memory/@nodeset")
memory_mode = XMLProperty("./memory/@mode")
memory_placement = XMLProperty("./memory/@placement")