2017-03-06 06:12:50 +08:00
|
|
|
# Copyright 2017 Red Hat, Inc.
|
|
|
|
# Cole Robinson <crobinso@redhat.com>
|
|
|
|
#
|
2018-03-21 03:00:02 +08:00
|
|
|
# This work is licensed under the GNU GPLv2.
|
|
|
|
# See the COPYING file in the top-level directory.
|
2017-03-06 06:12:50 +08:00
|
|
|
|
2018-03-21 03:10:04 +08:00
|
|
|
from ..xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty
|
2017-03-06 06:12:50 +08:00
|
|
|
|
|
|
|
|
|
|
|
class _XMLNSQemuArg(XMLBuilder):
|
2018-03-21 22:53:34 +08:00
|
|
|
XML_NAME = "qemu:arg"
|
2017-03-06 06:12:50 +08:00
|
|
|
|
|
|
|
value = XMLProperty("./@value")
|
|
|
|
|
|
|
|
|
|
|
|
class _XMLNSQemuEnv(XMLBuilder):
|
2018-03-21 22:53:34 +08:00
|
|
|
XML_NAME = "qemu:env"
|
2017-03-06 06:12:50 +08:00
|
|
|
|
|
|
|
name = XMLProperty("./@name")
|
|
|
|
value = XMLProperty("./@value")
|
|
|
|
|
|
|
|
|
2018-03-21 03:10:04 +08:00
|
|
|
class DomainXMLNSQemu(XMLBuilder):
|
2017-03-06 06:12:50 +08:00
|
|
|
"""
|
|
|
|
Class for generating <qemu:commandline> XML
|
|
|
|
"""
|
2018-03-21 22:53:34 +08:00
|
|
|
XML_NAME = "qemu:commandline"
|
2017-10-21 03:26:03 +08:00
|
|
|
_XML_PROP_ORDER = ["args", "envs"]
|
2017-03-06 06:12:50 +08:00
|
|
|
|
|
|
|
args = XMLChildProperty(_XMLNSQemuArg)
|
|
|
|
envs = XMLChildProperty(_XMLNSQemuEnv)
|