diff options
Diffstat (limited to 'virtinst')
-rw-r--r-- | virtinst/cli.py | 20 | ||||
-rw-r--r-- | virtinst/guest.py | 4 |
2 files changed, 23 insertions, 1 deletions
diff --git a/virtinst/cli.py b/virtinst/cli.py index 5accba8f..64fc9e27 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -763,6 +763,10 @@ def add_device_options(devg, sound_back_compat=False): def add_guest_xml_options(geng): + ParserIOThreads.register() + geng.add_argument("--iothreads", action="append", + help=_("Set domain <iothreads> configuration.")) + ParserSeclabel.register() geng.add_argument("--seclabel", "--security", action="append", help=_("Set domain seclabel configuration.")) @@ -2010,6 +2014,22 @@ class ParserCputune(VirtCLIParser): find_inst_cb=cls.vcpu_find_inst_cb) +####################### +# --iothreads parsing # +####################### + +class ParserIOThreads(VirtCLIParser): + cli_arg_name = "iothreads" + guest_propname = "iothreads" + remove_first = "iothreads" + + @classmethod + def _init_class(cls, **kwargs): + VirtCLIParser._init_class(**kwargs) + # Options for IOThreads config + cls.add_arg("iothreads", "iothreads") + + ################### # --vcpus parsing # ################### diff --git a/virtinst/guest.py b/virtinst/guest.py index 5479d4e9..6a60583e 100644 --- a/virtinst/guest.py +++ b/virtinst/guest.py @@ -145,7 +145,7 @@ class Guest(XMLBuilder): XML_NAME = "domain" _XML_PROP_ORDER = [ "type", "name", "uuid", "genid", "genid_enable", - "title", "description", "_metadata", + "title", "description", "_metadata", "iothreads", "maxMemory", "maxMemorySlots", "memory", "_currentMemory", "blkiotune", "memtune", "memoryBacking", "_vcpus", "vcpu_current", "vcpu_placement", @@ -179,6 +179,8 @@ class Guest(XMLBuilder): name = XMLProperty("./name") + iothreads = XMLProperty("./iothreads", is_int=True) + def _set_currentMemory(self, val): if val is not None: val = int(val) |