commit 84041280dc10a5bba24230a3244809e08c082e8e Author: Ondrej Lichtner olichtne@redhat.com Date: Mon Mar 31 13:25:39 2014 +0200
schema-recipe.rng: add element ovs_bridge
This element represents an Open vSwitch bridge. This element has a mandatory child element <slaves> that defines which previously defined interfaces should be connected to the new bridge as ports.
To create VLANs on this bridge we can use the <vlan> elements. This vlan element is different from the element that defines a linux vlan interface. This element defines a virtual lan identified by it's "tag" (a mandatory attribute) that contains ports that are defined in the <slaves> element in the usual way. It is important to note that one port can be in multiple vlans, this makes the port a VLAN trunk.
Finally the bridge can define zero or more bonds by child elements <bond>. These are similar to normal linux bonds, however at the moment they don't accept any options, only the specification of it's slaves. These bond slaves MUST be a subset of the bridges slaves!
As usual the <define> tag can be used anywhere.
An example use in a recipe: <ovs_bridge id="ovs_br"> <slaves> <slave id="t1"/> <slave id="t2"/> </slaves> <vlan tag="1"> <slaves> <slave id="t1"/> </slaves> </vlan> <bond id="mfg"> <slaves> <slave id="t1"/> <slave id="t2"/> </slaves> </bond> </ovs_bridge>
Signed-off-by: Ondrej Lichtner olichtne@redhat.com Signed-off-by: Jiri Pirko jiri@resnulli.us
schema-recipe.rng | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 78 insertions(+), 0 deletions(-) --- diff --git a/schema-recipe.rng b/schema-recipe.rng index 129d7e7..b623a99 100644 --- a/schema-recipe.rng +++ b/schema-recipe.rng @@ -134,6 +134,7 @@ <ref name="vlan"/> <ref name="macvlan"/> <ref name="team"/> + <ref name="ovs_bridge"/> </choice> </zeroOrMore> </element> @@ -175,6 +176,83 @@ </element> </define>
+ <define name="ovs_bridge"> + <element name="ovs_bridge"> + <attribute name="id"/> + + <interleave> + <optional> + <ref name="define"/> + </optional> + + <element name="slaves"> + <interleave> + <optional> + <ref name="define"/> + </optional> + + <oneOrMore> + <element name="slave"> + <attribute name="id"/> + </element> + </oneOrMore> + </interleave> + </element> + + <zeroOrMore> + <element name="bond"> + <attribute name="id"/> + + <interleave> + <optional> + <ref name="define"/> + </optional> + + <element name="slaves"> + <interleave> + <optional> + <ref name="define"/> + </optional> + + <oneOrMore> + <element name="slave"> + <attribute name="id"/> + </element> + </oneOrMore> + </interleave> + </element> + </interleave> + </element> + </zeroOrMore> + <zeroOrMore> + <element name="vlan"> + <attribute name="tag"/> + + <interleave> + <optional> + <ref name="define"/> + </optional> + + <element name="slaves"> + <interleave> + <optional> + <ref name="define"/> + </optional> + + <oneOrMore> + <element name="slave"> + <attribute name="id"/> + </element> + </oneOrMore> + </interleave> + </element> + </interleave> + </element> + </zeroOrMore> + </interleave> + </element> + </define> + <define name="vlan"> <element name="vlan"> <attribute name="id"/>
lnst-developers@lists.fedorahosted.org