From: Ondrej Lichtner <olichtne(a)redhat.com>
This commit adds a new example recipe for Open vSwitch. The test follows
the example from the official Open vSwitch Configuration Cookbook on
VLANs
http://openvswitch.org/support/config-cookbooks/vlan-configuration-cookbook/
The only difference is that the recipe uses 6 machines (in my case all
virtual) instead of 2 physical hosts with 2 virtual machines each, but
the end result should be the same.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
recipes/examples/ovs/ovs_vlan.xml | 145 ++++++++++++++++++++++++++++++++++++++
1 file changed, 145 insertions(+)
create mode 100644 recipes/examples/ovs/ovs_vlan.xml
diff --git a/recipes/examples/ovs/ovs_vlan.xml b/recipes/examples/ovs/ovs_vlan.xml
new file mode 100644
index 0000000..4ba5496
--- /dev/null
+++ b/recipes/examples/ovs/ovs_vlan.xml
@@ -0,0 +1,145 @@
+<lnstrecipe>
+ <network>
+ <host id="vm1">
+ <interfaces>
+ <eth id="if1" label="n1">
+ <addresses>
+ <address value="192.168.200.1/24"/>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ <host id="vm2">
+ <interfaces>
+ <eth id="if2" label="n2">
+ <addresses>
+ <address value="192.168.200.2/24"/>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ <host id="vm3">
+ <interfaces>
+ <eth id="if3" label="n3">
+ <addresses>
+ <address value="192.168.200.3/24"/>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ <host id="vm4">
+ <interfaces>
+ <eth id="if4" label="n4">
+ <addresses>
+ <address value="192.168.200.4/24"/>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ <host id="h1">
+ <params>
+ <param name="ovs_support" value="true"/>
+ </params>
+ <interfaces>
+ <eth id="if1" label="n1"/>
+ <eth id="if2" label="n2"/>
+ <eth id="if3" label="data_net"/>
+ <ovs_bridge id="ovs1">
+ <slaves>
+ <slave id="if1"/>
+ <slave id="if2"/>
+ <slave id="if3"/>
+ </slaves>
+ <vlan tag="1">
+ <slaves>
+ <slave id="if1"/>
+ </slaves>
+ </vlan>
+ <vlan tag="2">
+ <slaves>
+ <slave id="if2"/>
+ </slaves>
+ </vlan>
+ </ovs_bridge>
+ </interfaces>
+ </host>
+ <host id="h2">
+ <params>
+ <param name="ovs_support" value="true"/>
+ </params>
+ <interfaces>
+ <eth id="if1" label="n3"/>
+ <eth id="if2" label="n4"/>
+ <eth id="if3" label="data_net"/>
+ <ovs_bridge id="ovs2">
+ <slaves>
+ <slave id="if1"/>
+ <slave id="if2"/>
+ <slave id="if3"/>
+ </slaves>
+ <vlan tag="1">
+ <slaves>
+ <slave id="if1"/>
+ </slaves>
+ </vlan>
+ <vlan tag="2">
+ <slaves>
+ <slave id="if2"/>
+ </slaves>
+ </vlan>
+ </ovs_bridge>
+ </interfaces>
+ </host>
+ </network>
+
+ <task>
+ <run host="vm1" module="IcmpPing" timeout="30"
expect="fail">
+ <options>
+ <option name="addr" value="{ip(vm2,if2)}"/>
+ <option name="count" value="40"/>
+ <option name="interval" value="0"/>
+ <option name="limit_rate" value="95"/>
+ </options>
+ </run>
+ <run host="vm1" module="IcmpPing" timeout="30"
expect="pass">
+ <options>
+ <option name="addr" value="{ip(vm3,if3)}"/>
+ <option name="count" value="40"/>
+ <option name="interval" value="0"/>
+ <option name="limit_rate" value="95"/>
+ </options>
+ </run>
+ <run host="vm1" module="IcmpPing" timeout="30"
expect="fail">
+ <options>
+ <option name="addr" value="{ip(vm4,if4)}"/>
+ <option name="count" value="40"/>
+ <option name="interval" value="0"/>
+ <option name="limit_rate" value="95"/>
+ </options>
+ </run>
+ <run host="vm2" module="IcmpPing" timeout="30"
expect="fail">
+ <options>
+ <option name="addr" value="{ip(vm1,if1)}"/>
+ <option name="count" value="40"/>
+ <option name="interval" value="0"/>
+ <option name="limit_rate" value="95"/>
+ </options>
+ </run>
+ <run host="vm2" module="IcmpPing" timeout="30"
expect="fail">
+ <options>
+ <option name="addr" value="{ip(vm3,if3)}"/>
+ <option name="count" value="40"/>
+ <option name="interval" value="0"/>
+ <option name="limit_rate" value="95"/>
+ </options>
+ </run>
+ <run host="vm2" module="IcmpPing" timeout="30"
expect="pass">
+ <options>
+ <option name="addr" value="{ip(vm4,if4)}"/>
+ <option name="count" value="40"/>
+ <option name="interval" value="0"/>
+ <option name="limit_rate" value="95"/>
+ </options>
+ </run>
+ </task>
+</lnstrecipe>
--
1.8.5.3