commit 71aee0f2c91200bf9f25af25e33340a052a367ca Author: Ondrej Lichtner olichtne@redhat.com Date: Thu Aug 21 14:25:28 2014 +0200
schema-recipe: add support for veth interfaces
This patch adds recipe XML support for veth interfaces. Since veth devices are created in pairs, XML specification reflects this by encapsulating two <veth> tags in a single <veth_pair> tag. Both of these tags are mandatory. At the moment there are no <options> supported - you can specify them, but they will be ignored.
Example interface specification would look something like this:
<interfaces> <eth id="out_if" label="tnet"/> <veth_pair> <veth id="testifc1" netns="xyz"> <addresses> <address value="192.168.200.2/24"/> </addresses> </veth> <veth id="testifc2"/> </veth_pair> <bridge id="br"> <slaves> <slave id="out_if"/> <slave id="testifc2"/> </slaves> </bridge> </interfaces>
Signed-off-by: Ondrej Lichtner olichtne@redhat.com Signed-off-by: Jiri Pirko jiri@resnulli.us
schema-recipe.rng | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) --- diff --git a/schema-recipe.rng b/schema-recipe.rng index 6795f72..f13f36a 100644 --- a/schema-recipe.rng +++ b/schema-recipe.rng @@ -135,6 +135,7 @@ <ref name="macvlan"/> <ref name="team"/> <ref name="ovs_bridge"/> + <ref name="veth_pair"/> </choice> </zeroOrMore> </element> @@ -328,6 +329,41 @@ </interleave> </define>
+ <define name="veth_pair"> + <element name="veth_pair"> + <optional> + <ref name="define"/> + </optional> + <ref name="veth"/> + <optional> + <ref name="define"/> + </optional> + <ref name="veth"/> + </element> + </define> + + <define name="veth"> + <element name="veth"> + <attribute name="id"/> + <optional> + <attribute name="netns"/> + </optional> + <interleave> + <optional> + <ref name="define"/> + </optional> + + <zeroOrMore> + <ref name="options"/> + </zeroOrMore> + + <optional> + <ref name="addresses"/> + </optional> + </interleave> + </element> + </define> + <define name="options"> <element name="options"> <interleave>
lnst-developers@lists.fedorahosted.org