mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
2f89ecf4a9
Similar to what was done in libvirt. See these commits:600462834f
c99e954973
35 lines
792 B
Python
35 lines
792 B
Python
# Copyright 2017 Red Hat, Inc.
|
|
#
|
|
# This work is licensed under the GNU GPLv2 or later.
|
|
# See the COPYING file in the top-level directory.
|
|
|
|
from ..xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty
|
|
|
|
|
|
XMLBuilder.register_namespace(
|
|
"qemu", "http://libvirt.org/schemas/domain/qemu/1.0")
|
|
|
|
|
|
class _XMLNSQemuArg(XMLBuilder):
|
|
XML_NAME = "qemu:arg"
|
|
|
|
value = XMLProperty("./@value")
|
|
|
|
|
|
class _XMLNSQemuEnv(XMLBuilder):
|
|
XML_NAME = "qemu:env"
|
|
|
|
name = XMLProperty("./@name")
|
|
value = XMLProperty("./@value")
|
|
|
|
|
|
class DomainXMLNSQemu(XMLBuilder):
|
|
"""
|
|
Class for generating <qemu:commandline> XML
|
|
"""
|
|
XML_NAME = "qemu:commandline"
|
|
_XML_PROP_ORDER = ["args", "envs"]
|
|
|
|
args = XMLChildProperty(_XMLNSQemuArg)
|
|
envs = XMLChildProperty(_XMLNSQemuEnv)
|