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

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



On 01/10/2012 01:04 PM, Eric Blake wrote:
On 12/09/2011 08:07 AM, Stefan Berger wrote:
-
+<p>
+<span class="since">Since 0.9.9</span>  it is possible to access
We missed the release; s/0.9.9/0.9.10/

Fixed.


+      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.
I would also mention:

$VARIABLE is short-hand for $VARIABLE[ 0]   When combining variables,
each variable that uses the same iterator ID will be directly combined;
it is the use of different iterator IDs that causes all combinations to
be generated.

And maybe even mention an example:

If variable A is the list [1, 2], and variable B is the list [3, 4],
then combining $A[ 0] and $B[ 0] produces the list [1/3, 2/4], while
combining $A[ 0] and $B[ 1] produces the list [1/3, 1/4, 2/3, 2/4].

Overall, I like what is in this series, but I think I had enough minor
findings that it would be worth posting a v2 before pushing anything.

I added a concrete example now and mention the $VARIABLE being equivalent to $VARIABLE[ 0]
Thanks.

   Stefan


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