
On Fri, Jun 24, 2016 at 11:33:50 -0400, Laine Stump wrote:
This is a generic version of virDomainDefMetadataSanitize() - the same functionality is now needed for network metadata. --- src/libvirt_private.syms | 1 + src/util/virxml.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ src/util/virxml.h | 2 ++ 3 files changed, 55 insertions(+)
[...]
diff --git a/src/util/virxml.c b/src/util/virxml.c index aa97940..37f0817 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -1083,6 +1083,58 @@ virXMLInjectNamespace(xmlNodePtr node, return 0; }
+/** + * virXMLNodeSanitizeNamespaces() + * @node: Sanitize the namespaces for this node + * + * This function removes subnodes in node that share the namespace. + * The first metadata entry of every duplicate namespace is kept. Additionally
This is a little inconsistent since the sentence still hints to 'metadata'.
+ * nodes with no namespace are deleted.
Maybe you can state here that this is mostly used to sanitize metadata.
+ */ +void +virXMLNodeSanitizeNamespaces(xmlNodePtr node) +{
ACK