Thu, Mar 27, 2014 at 01:57:06PM CET, olichtne(a)redhat.com wrote:
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. These slaves
have an optional attribute vlan_tag that makes the port an access port
for the specified VLAN, or an attribute vlan_tags if the port is a trunk
port. Only one of these attributes can be used at a time.
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" vlan_tag="1"/>
<slave id="t2" vlan_tag="1"/>
</slaves>
<bond id="mfg">
<slaves>
<slave id="t1"/>
<slave id="t2"/>
</slaves>
</bond>
I wonder if the vlan definition should not be on the same level as bond.
That would make more sense to me. Just define slaves in <slaves> tag and
after that, model the topo.
</ovs_bridge>
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
schema-recipe.rng | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/schema-recipe.rng b/schema-recipe.rng
index 129d7e7..08e5107 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,65 @@
</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"/>
+
+ <optional>
+ <choice>
+ <attribute name="vlan_tag"/>
+ <attribute name="vlan_tags"/>
+ </choice>
+ </optional>
+ </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>
+ </interleave>
+ </element>
+ </define>
+
<define name="vlan">
<element name="vlan">
<attribute name="id"/>
--
1.8.5.3
_______________________________________________
LNST-developers mailing list
LNST-developers(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/lnst-developers