From: Ondrej Lichtner <olichtne(a)redhat.com>
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(a)redhat.com>
---
schema-recipe.rng | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)
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"/>
--
1.8.5.3