提交 56ecb331 编写于 作者: J Ján Tomko

conf: domain: use virXMLNamespaceFormatNS

Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
上级 ff94298f
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册