mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
conf: domain: use virXMLNamespaceFormatNS
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
ff94298fad
commit
56ecb33102
@ -270,7 +270,7 @@ bhyveDomainDefNamespaceFormatXML(virBufferPtr buf,
|
||||
static const char *
|
||||
bhyveDomainDefNamespaceHref(void)
|
||||
{
|
||||
return "xmlns:bhyve='" BHYVE_NAMESPACE_HREF "'";
|
||||
return BHYVE_NAMESPACE_HREF;
|
||||
}
|
||||
|
||||
virXMLNamespace virBhyveDriverDomainXMLNamespace = {
|
||||
|
@ -28313,8 +28313,8 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
||||
virBufferAsprintf(buf, "<domain type='%s'", type);
|
||||
if (!(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE))
|
||||
virBufferAsprintf(buf, " id='%d'", def->id);
|
||||
if (def->namespaceData && def->ns.href)
|
||||
virBufferAsprintf(buf, " %s", (def->ns.href)());
|
||||
if (def->namespaceData && def->ns.format)
|
||||
virXMLNamespaceFormatNS(buf, &def->ns);
|
||||
virBufferAddLit(buf, ">\n");
|
||||
virBufferAdjustIndent(buf, 2);
|
||||
|
||||
|
@ -313,7 +313,7 @@ lxcDomainDefNamespaceFormatXML(virBufferPtr buf,
|
||||
static const char *
|
||||
lxcDomainDefNamespaceHref(void)
|
||||
{
|
||||
return "xmlns:lxc='" LXC_NAMESPACE_HREF "'";
|
||||
return LXC_NAMESPACE_HREF;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3724,7 +3724,7 @@ qemuDomainDefNamespaceFormatXML(virBufferPtr buf,
|
||||
static const char *
|
||||
qemuDomainDefNamespaceHref(void)
|
||||
{
|
||||
return "xmlns:qemu='" QEMU_NAMESPACE_HREF "'";
|
||||
return QEMU_NAMESPACE_HREF;
|
||||
}
|
||||
|
||||
|
||||
|
@ -181,6 +181,12 @@ struct _testDomainNamespaceDef {
|
||||
xmlNodePtr *snap_nodes;
|
||||
};
|
||||
|
||||
static const char*
|
||||
testDomainDefNamespaceHref(void)
|
||||
{
|
||||
return TEST_NAMESPACE_HREF;
|
||||
}
|
||||
|
||||
static void
|
||||
testDomainDefNamespaceFree(void *data)
|
||||
{
|
||||
@ -430,6 +436,7 @@ testDriverNew(void)
|
||||
.parse = testDomainDefNamespaceParse,
|
||||
.free = testDomainDefNamespaceFree,
|
||||
.prefix = "test",
|
||||
.href = testDomainDefNamespaceHref,
|
||||
};
|
||||
virDomainDefParserConfig config = {
|
||||
.features = VIR_DOMAIN_DEF_FEATURE_MEMORY_HOTPLUG |
|
||||
|
@ -600,7 +600,7 @@ virVMXDomainDefNamespaceFormatXML(virBufferPtr buf, void *nsdata)
|
||||
static const char *
|
||||
virVMXDomainDefNamespaceHref(void)
|
||||
{
|
||||
return "xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'";
|
||||
return "http://libvirt.org/schemas/domain/vmware/1.0";
|
||||
}
|
||||
|
||||
static virXMLNamespace virVMXDomainXMLNamespace = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user