[PATCH 6/6] Add documentation new ways to access members of variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds documentation about the new 'ways' that users can
access the contents of variables in filters:

- access via index: $TEST[2]
- access via iterators $TEST[@1]

---
 docs/formatnwfilter.html.in |   32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

Index: libvirt-iterator/docs/formatnwfilter.html.in
===================================================================
--- libvirt-iterator.orig/docs/formatnwfilter.html.in
+++ libvirt-iterator/docs/formatnwfilter.html.in
@@ -308,7 +308,37 @@
   </rule>
   ...
 </pre>
-
+    <p>
+      <span class="since">Since 0.9.9</span> it is possible to access
+      individual elements of a variable holding a list of elements.
+      A filtering rule like the following accesses the 2nd element
+      of the variable DSTPORTS.
+    </p>
+<pre>
+  ...
+  &lt;rule action='accept' direction='in' priority='500'&gt;
+    &lt;udp dstportstart='$DSTPORTS[1]'/&gt;
+  &lt;/rule&gt;
+  ...
+</pre>
+    <p>
+      <span class="since">Since 0.9.9</span> it is possible to create
+      filtering rules that instantiate all combinations of rules from
+      different lists using the notation of
+      <code>$VARIABLE[@&lt;iterator ID&gt;]</code>.
+      The following rule allows a virtual machine to
+      receive traffic on a set of ports, which are specified in DSTPORTS,
+      from the set of source IP address specified in SRCIPADDRESSES.
+      The rule generates all combinations of elements of the variable
+      DSTPORT with those of SRCIPADDRESSES.
+    </p>
+<pre>
+  ...
+  &lt;rule action='accept' direction='in' priority='500'&gt;
+    &lt;ip srcipaddr='$SRCIPADDRESSES[@1]' dstportstart='$DSTPORTS[@2]'/&gt;
+  &lt;/rule&gt;
+  ...
+</pre>
     <h2><a name="nwfelems">Element and attribute overview</a></h2>
 
     <p>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]