mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
2f89ecf4a9
Similar to what was done in libvirt. See these commits:600462834f
c99e954973
26 lines
615 B
Python
26 lines
615 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(
|
|
"libosinfo", "http://libosinfo.org/xmlns/libvirt/domain/1.0")
|
|
|
|
|
|
class _XMLNSLibosinfo(XMLBuilder):
|
|
XML_NAME = "libosinfo:libosinfo"
|
|
|
|
os_id = XMLProperty("./libosinfo:os/@id")
|
|
|
|
|
|
class DomainMetadata(XMLBuilder):
|
|
"""
|
|
Class for generating <metadata> XML
|
|
"""
|
|
XML_NAME = "metadata"
|
|
|
|
libosinfo = XMLChildProperty(_XMLNSLibosinfo, is_single=True)
|