[lnst] add recipes dir and simple team recipe

Jiří Pírko jirka at fedoraproject.org
Thu Aug 16 11:46:06 UTC 2012


commit 4ff72f696aa397b4a1b3a9a43c9fc5febc3f3c33
Author: Jiri Pirko <jiri at resnulli.us>
Date:   Thu Aug 16 13:44:32 2012 +0200

    add recipes dir and simple team recipe
    
    Signed-off-by: Jiri Pirko <jiri at resnulli.us>

 recipes/team/netconfig-test1_001.xml    |   20 ++++++++++++++++++++
 recipes/team/netconfig-test2_001.xml    |   20 ++++++++++++++++++++
 recipes/team/netmachineconfig-test1.xml |    7 +++++++
 recipes/team/netmachineconfig-test2.xml |    7 +++++++
 recipes/team/recipe_001.xml             |   13 +++++++++++++
 recipes/team/sequence_ping_simple.xml   |   11 +++++++++++
 6 files changed, 78 insertions(+), 0 deletions(-)
---
diff --git a/recipes/team/netconfig-test1_001.xml b/recipes/team/netconfig-test1_001.xml
new file mode 100644
index 0000000..6d12db0
--- /dev/null
+++ b/recipes/team/netconfig-test1_001.xml
@@ -0,0 +1,20 @@
+<netconfig>
+    <interface id="1" phys_id="1" type="eth"/>
+    <interface id="2" phys_id="2" type="eth"/>
+    <interface id="3" type="team">
+        <options>
+            <option name="teamd_config">
+                {
+                    "runner":   {"name": "roundrobin"}
+                }
+            </option>
+        </options>
+        <slaves>
+            <slave id="1"/>
+            <slave id="2"/>
+        </slaves>
+        <addresses>
+             <address value="192.168.111.1/24"/>
+        </addresses>
+    </interface>
+</netconfig>
diff --git a/recipes/team/netconfig-test2_001.xml b/recipes/team/netconfig-test2_001.xml
new file mode 100644
index 0000000..0a406c5
--- /dev/null
+++ b/recipes/team/netconfig-test2_001.xml
@@ -0,0 +1,20 @@
+<netconfig>
+    <interface id="1" phys_id="1" type="eth"/>
+    <interface id="2" phys_id="2" type="eth"/>
+    <interface id="3" type="team">
+        <options>
+            <option name="teamd_config">
+                {
+                    "runner":   {"name": "roundrobin"}
+                }
+            </option>
+        </options>
+        <slaves>
+            <slave id="1"/>
+            <slave id="2"/>
+        </slaves>
+        <addresses>
+             <address value="192.168.111.2/24"/>
+        </addresses>
+    </interface>
+</netconfig>
diff --git a/recipes/team/netmachineconfig-test1.xml b/recipes/team/netmachineconfig-test1.xml
new file mode 100644
index 0000000..dc01321
--- /dev/null
+++ b/recipes/team/netmachineconfig-test1.xml
@@ -0,0 +1,7 @@
+<netmachineconfig>
+  <info hostname="192.168.122.182" rootpass="aaa"/>
+  <netdevices>
+    <netdevice type="eth" phys_id="1" hwaddr="52:54:00:3d:c7:6d" network="testing"/>
+    <netdevice type="eth" phys_id="2" hwaddr="52:54:00:73:15:c2" network="testing"/>
+  </netdevices>
+</netmachineconfig>
diff --git a/recipes/team/netmachineconfig-test2.xml b/recipes/team/netmachineconfig-test2.xml
new file mode 100644
index 0000000..5272314
--- /dev/null
+++ b/recipes/team/netmachineconfig-test2.xml
@@ -0,0 +1,7 @@
+<netmachineconfig>
+  <info hostname="192.168.122.223" rootpass="aaa"/>
+  <netdevices>
+    <netdevice type="eth" phys_id="1" hwaddr="52:54:00:99:bb:27" network="testing"/>
+    <netdevice type="eth" phys_id="2" hwaddr="52:54:00:b7:cc:fb" network="testing"/>
+  </netdevices>
+</netmachineconfig>
diff --git a/recipes/team/recipe_001.xml b/recipes/team/recipe_001.xml
new file mode 100644
index 0000000..50276e3
--- /dev/null
+++ b/recipes/team/recipe_001.xml
@@ -0,0 +1,13 @@
+<nettestrecipe>
+    <machines>
+        <machine id="1">
+            <netmachineconfig source="netmachineconfig-test1.xml"/>
+            <netconfig source="netconfig-test1_001.xml"/>
+        </machine>
+        <machine id="2">
+            <netmachineconfig source="netmachineconfig-test2.xml"/>
+            <netconfig source="netconfig-test2_001.xml"/>
+        </machine>
+    </machines>
+    <command_sequence source="sequence_ping_simple.xml"/>
+</nettestrecipe>
diff --git a/recipes/team/sequence_ping_simple.xml b/recipes/team/sequence_ping_simple.xml
new file mode 100644
index 0000000..d4d2adf
--- /dev/null
+++ b/recipes/team/sequence_ping_simple.xml
@@ -0,0 +1,11 @@
+<command_sequence>
+  <command type="exec" value="sleep 4"/>
+  <command machine_id="1" timeout="30" type="test" value="IcmpPing">
+    <options>
+      <option name="addr" value="{$recipe['machines'][2]['netconfig'][3]['addresses'][0]}"/>
+      <option name="count" value="40"/>
+      <option name="interval" value="0.2"/>
+      <option name="limit_rate" value="95"/>
+    </options>
+  </command>
+</command_sequence>


More information about the LNST-developers mailing list