[PATCH 01/16] xml: Add <title>, <description> and <metadata> to nwfilter xml schema

K Shiva Kiran shiva_kr at riseup.net
Sun Sep 3 15:49:02 UTC 2023


Signed-off-by: K Shiva Kiran <shiva_kr at riseup.net>
---
 docs/formatnwfilter.rst       | 31 +++++++++++++++++++++++++++++++
 src/conf/schemas/nwfilter.rng |  9 +++++++++
 2 files changed, 40 insertions(+)

diff --git a/docs/formatnwfilter.rst b/docs/formatnwfilter.rst
index 434da5b1fd..766d7e85f5 100644
--- a/docs/formatnwfilter.rst
+++ b/docs/formatnwfilter.rst
@@ -419,6 +419,37 @@ better organized for more efficient processing by the firewall subsystem of the
 underlying host. Currently the system only supports the chains
 ``root,       ipv4, ipv6, arp and rarp``.
 
+General Metadata
+~~~~~~~~~~~~~~~~
+
+::
+
+  <filter name='clean-traffic' filter='arp'>
+    <uuid>6ef53069-ba34-94a0-d33d-17751b9b8cb1</uuid>
+    <title>A short description - title - of the filter</title>
+     <description>Some human readable description</description>
+     <metadata>
+       <app1:foo xmlns:app1="http://app1.org/app1/">..</app1:foo>
+       <app2:bar xmlns:app2="http://app1.org/app2/">..</app2:bar>
+     </metadata>
+     ...
+  </filter>
+
+``title``
+   The optional element ``title`` provides space for a short description of the
+   filter. The title should not contain any newlines. :since:`Since 9.8.0` .
+``description``
+   The content of the ``description`` element provides a human readable
+   description of the filter. This data is not used by libvirt in any
+   way, it can contain any information the user wants. :since:`Since 9.8.0`
+``metadata``
+   The ``metadata`` node can be used by applications to store custom metadata in
+   the form of XML nodes/trees. Applications must use custom namespaces on their
+   XML nodes/trees, with only one top-level element per namespace (if the
+   application needs structure, they should have sub-elements to their namespace
+   element). :since:`Since 9.8.0`
+
+
 References to other filters
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/src/conf/schemas/nwfilter.rng b/src/conf/schemas/nwfilter.rng
index 262bd551e3..c56bbac732 100644
--- a/src/conf/schemas/nwfilter.rng
+++ b/src/conf/schemas/nwfilter.rng
@@ -14,6 +14,15 @@
             <ref name="UUID"/>
           </element>
         </optional>
+        <optional>
+          <ref name="title"/>
+        </optional>
+        <optional>
+          <ref name="description"/>
+        </optional>
+        <optional>
+          <ref name="metadata"/>
+        </optional>
         <zeroOrMore>
           <choice>
             <element name="filterref">
-- 
2.42.0



More information about the libvir-list mailing list