cli: introduce --resource fibrechannel.appid option

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2021-09-14 17:08:35 +02:00
parent be05135867
commit 0953e1aea1
4 changed files with 5 additions and 2 deletions

View File

@ -19,6 +19,7 @@
</numatune>
<resource>
<partition>/virtualmachines/production</partition>
<fibrechannel appid="myapplication"/>
</resource>
<os>
<type arch="x86_64" machine="q35">hvm</type>

View File

@ -479,7 +479,7 @@ c.add_compare("""
--memorybacking hugepages=on
--features apic=off
--clock offset=localtime
--resource /virtualmachines/production
--resource /virtualmachines/production,fibrechannel.appid=myapplication
--events on_crash=restart
--metadata genid_enable=yes
--sysinfo host

View File

@ -2003,6 +2003,7 @@ class ParserResource(VirtCLIParser):
def _init_class(cls, **kwargs):
VirtCLIParser._init_class(**kwargs)
cls.add_arg("partition", "partition")
cls.add_arg("fibrechannel.appid", "fibrechannel_appid", can_comma=True)
######################

View File

@ -14,6 +14,7 @@ class DomainResource(XMLBuilder):
"""
XML_NAME = "resource"
_XML_PROP_ORDER = ["partition"]
_XML_PROP_ORDER = ["partition", "fibrechannel_appid"]
partition = XMLProperty("./partition")
fibrechannel_appid = XMLProperty("./fibrechannel/@appid")