[lnst] point xslt references to lnst-project.org
by Jiří Pírko
commit e80caf0efb9d172c90a1a1d157a328e312a757d6
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Thu Jun 26 10:38:18 2014 +0200
point xslt references to lnst-project.org
This adjusts the generated xml result files to use xslt resources stored
on the lnst-project.org webpage. This should make it very easy to use
xml result files by simply opening them in a web browser which will take
care of formatting them if the computer is connected to the internet.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst-ctl.conf | 2 +-
lnst/Common/Config.py | 2 +-
result_xslt/xml_to_html.xsl | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lnst-ctl.conf b/lnst-ctl.conf
index 3b32697..d046630 100644
--- a/lnst-ctl.conf
+++ b/lnst-ctl.conf
@@ -10,4 +10,4 @@ machine_pool_dirs =
test_tool_dirs = ./test_tools
test_module_dirs = ./test_modules
log_dir = ./Logs
-xslt_url = ./result_xslt/xml_to_html.xsl
+xslt_url = http://www.lnst-project.org/files/result_xslt/xml_to_html.xsl
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py
index 975df5a..0fe585d 100644
--- a/lnst/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -70,7 +70,7 @@ class Config():
"action" : self.optionPath,
"name" : "resource_dir"}
self._options['environment']['xslt_url'] = {
- "value" : "./result_xslt/xml_to_html.xsl",
+ "value" : "http://www.lnst-project.org/files/result_xslt/xml_to_html.xsl",
"additive" : False,
"action" : self.optionPlain,
"name" : "xslt_url"
diff --git a/result_xslt/xml_to_html.xsl b/result_xslt/xml_to_html.xsl
index 7774bbb..0cef698 100644
--- a/result_xslt/xml_to_html.xsl
+++ b/result_xslt/xml_to_html.xsl
@@ -4,8 +4,8 @@
<xsl:template match="/">
<html>
<body>
- <link rel="stylesheet" type="text/css" href="./xml_to_html.xsl"/>
- <script type="text/javascript" src="./xml_to_html.js"/>
+ <link rel="stylesheet" type="text/css" href="http://www.lnst-project.org/files/result_xslt/xml_to_html.xsl"/>
+ <script type="text/javascript" src="http://www.lnst-project.org/files/result_xslt/xml_to_html.js"/>
<h2>LNST results</h2>
<xsl:apply-templates select="results/recipe"/>
</body>
9 years, 9 months
[PATCH] point xslt references to lnst-project.org
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
This adjusts the generated xml result files to use xslt resources stored
on the lnst-project.org webpage. This should make it very easy to use
xml result files by simply opening them in a web browser which will take
care of formatting them if the computer is connected to the internet.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst-ctl.conf | 2 +-
lnst/Common/Config.py | 2 +-
result_xslt/xml_to_html.xsl | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lnst-ctl.conf b/lnst-ctl.conf
index 3b32697..d046630 100644
--- a/lnst-ctl.conf
+++ b/lnst-ctl.conf
@@ -10,4 +10,4 @@ machine_pool_dirs =
test_tool_dirs = ./test_tools
test_module_dirs = ./test_modules
log_dir = ./Logs
-xslt_url = ./result_xslt/xml_to_html.xsl
+xslt_url = http://www.lnst-project.org/files/result_xslt/xml_to_html.xsl
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py
index 975df5a..0fe585d 100644
--- a/lnst/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -70,7 +70,7 @@ class Config():
"action" : self.optionPath,
"name" : "resource_dir"}
self._options['environment']['xslt_url'] = {
- "value" : "./result_xslt/xml_to_html.xsl",
+ "value" : "http://www.lnst-project.org/files/result_xslt/xml_to_html.xsl",
"additive" : False,
"action" : self.optionPlain,
"name" : "xslt_url"
diff --git a/result_xslt/xml_to_html.xsl b/result_xslt/xml_to_html.xsl
index 7774bbb..0cef698 100644
--- a/result_xslt/xml_to_html.xsl
+++ b/result_xslt/xml_to_html.xsl
@@ -4,8 +4,8 @@
<xsl:template match="/">
<html>
<body>
- <link rel="stylesheet" type="text/css" href="./xml_to_html.xsl"/>
- <script type="text/javascript" src="./xml_to_html.js"/>
+ <link rel="stylesheet" type="text/css" href="http://www.lnst-project.org/files/result_xslt/xml_to_html.xsl"/>
+ <script type="text/javascript" src="http://www.lnst-project.org/files/result_xslt/xml_to_html.js"/>
<h2>LNST results</h2>
<xsl:apply-templates select="results/recipe"/>
</body>
--
1.9.3
9 years, 9 months
[PATCH] TaskAPI: don't use kwargs for passing options to test module
by Jan Tluka
Currently the TaskAPI uses kwargs to pass options to a test module. If a
user decides to run test module from XML there are no limitations on the
name of an option. But when the user uses TaskAPI get_module method the
option names are limited because of Python reserved words [1]. Developer
of a test might want to use e.g. 'if' for a variable containing an interface
to use for testing. To be consistent between the two approaches I'm sending
a patch that uses parameter 'options' of type dictionary for passing the
test module options.
Example:
Old: my_mod = ctl.get_module("Multicast",
setup="send_simple",
duration=10,
condition="status == 'pass'")
New: my_mod = ctl.get_module("Multicast", options={
"setup": "send_simple",
"duration": 10,
"condition": "status == 'pass'"})
I have tested the patch using Multicast test module and it works fine.
[1] https://docs.python.org/2/reference/lexical_analysis.html#keywords
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Controller/Task.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
index 59f17c5..315b099 100644
--- a/lnst/Controller/Task.py
+++ b/lnst/Controller/Task.py
@@ -53,7 +53,7 @@ class ControllerAPI(object):
host = self._hosts[host_id]
return HostAPI(self, host_id, host)
- def get_module(self, name, **kwargs):
+ def get_module(self, name, options={}):
"""
Initialize a module to be run on a host.
@@ -63,7 +63,7 @@ class ControllerAPI(object):
:return: The module handle.
:rtype: ModuleAPI
"""
- return ModuleAPI(name, kwargs)
+ return ModuleAPI(name, options)
def wait(self, seconds):
"""
--
1.8.1.4
9 years, 9 months
[lnst] Adding team-vlan iperf recipes
by Jiří Pírko
commit 248d0c045179f6678248ed5b81e06db1b6e0a61c
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Mon Jun 16 14:21:29 2014 +0200
Adding team-vlan iperf recipes
Set of team recipes to test whether team driver can work with VLANs.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
recipes/team/interfaces/interfaces-simple_vlan.xml | 15 +++++
.../team/interfaces/interfaces-team_ab_vlan.xml | 58 ++++++++++++++++++++
.../team/interfaces/interfaces-team_bcast_vlan.xml | 32 +++++++++++
.../interfaces/interfaces-team_lacp_act_vlan.xml | 49 +++++++++++++++++
.../team/interfaces/interfaces-team_lacp_vlan.xml | 46 ++++++++++++++++
.../interfaces/interfaces-team_lb_act_vlan.xml | 38 +++++++++++++
.../team/interfaces/interfaces-team_lb_vlan.xml | 36 ++++++++++++
.../team/interfaces/interfaces-team_rr_vlan.xml | 32 +++++++++++
recipes/team/recipex_ab_vlan_004.xml | 19 +++++++
recipes/team/recipex_bcast_vlan_004.xml | 19 +++++++
recipes/team/recipex_lacp_act_vlan_004.xml | 19 +++++++
recipes/team/recipex_lacp_vlan_004.xml | 19 +++++++
recipes/team/recipex_lb_act_vlan_004.xml | 19 +++++++
recipes/team/recipex_lb_vlan_004.xml | 19 +++++++
recipes/team/recipex_rr_vlan_004.xml | 19 +++++++
15 files changed, 439 insertions(+), 0 deletions(-)
---
diff --git a/recipes/team/interfaces/interfaces-simple_vlan.xml b/recipes/team/interfaces/interfaces-simple_vlan.xml
new file mode 100644
index 0000000..68420c4
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-simple_vlan.xml
@@ -0,0 +1,15 @@
+<interfaces>
+ <eth id="eth" label="net1"/>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="eth"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_ab_vlan.xml b/recipes/team/interfaces/interfaces-team_ab_vlan.xml
new file mode 100644
index 0000000..47b47ca
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_ab_vlan.xml
@@ -0,0 +1,58 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {"name": "activebackup"},
+ "link_watch": {"name": "ethtool"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": -10,
+ "sticky": true
+ }
+ </option>
+ </options>
+ </slave>
+ <slave id="2">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": 100
+ }
+ </option>
+ </options>
+ </slave>
+ <slave id="3">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": 50
+ }
+ </option>
+ </options>
+ </slave>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_bcast_vlan.xml b/recipes/team/interfaces/interfaces-team_bcast_vlan.xml
new file mode 100644
index 0000000..89f5d79
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_bcast_vlan.xml
@@ -0,0 +1,32 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <!--"hwaddr": "00:11:22:33:44:55",-->
+ <option name="teamd_config">
+ {
+ "runner": {"name": "broadcast"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_lacp_act_vlan.xml b/recipes/team/interfaces/interfaces-team_lacp_act_vlan.xml
new file mode 100644
index 0000000..a60e5a8
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_lacp_act_vlan.xml
@@ -0,0 +1,49 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <!--"hwaddr": "00:11:22:33:44:55",-->
+ <option name="teamd_config">
+ {
+ "runner": {
+ "name": "lacp",
+ "active": true,
+ "fast_rate": true,
+ "tx_hash": ["eth", "ipv4", "ipv6"],
+ "tx_balancer": {
+ "name": "basic"
+ }
+ },
+ "link_watch": {"name": "ethtool"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": -10
+ }
+ </option>
+ </options>
+ </slave>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_lacp_vlan.xml b/recipes/team/interfaces/interfaces-team_lacp_vlan.xml
new file mode 100644
index 0000000..6611cbd
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_lacp_vlan.xml
@@ -0,0 +1,46 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <!--"hwaddr": "00:11:22:33:44:55",-->
+ <option name="teamd_config">
+ {
+ "runner": {
+ "name": "lacp",
+ "active": true,
+ "fast_rate": true,
+ "tx_hash": ["eth", "ipv4", "ipv6"]
+ },
+ "link_watch": {"name": "ethtool"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": -10
+ }
+ </option>
+ </options>
+ </slave>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_lb_act_vlan.xml b/recipes/team/interfaces/interfaces-team_lb_act_vlan.xml
new file mode 100644
index 0000000..8a2293b
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_lb_act_vlan.xml
@@ -0,0 +1,38 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {
+ "name": "loadbalance",
+ "tx_hash": ["eth", "ipv4", "ipv6"],
+ "tx_balancer": {
+ "name": "basic"
+ }
+ }
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_lb_vlan.xml b/recipes/team/interfaces/interfaces-team_lb_vlan.xml
new file mode 100644
index 0000000..7eb35c5
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_lb_vlan.xml
@@ -0,0 +1,36 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {
+ "name": "loadbalance",
+ "tx_hash": ["eth", "ipv4", "ipv6"]
+ }
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_rr_vlan.xml b/recipes/team/interfaces/interfaces-team_rr_vlan.xml
new file mode 100644
index 0000000..cdf51f2
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_rr_vlan.xml
@@ -0,0 +1,32 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {"name": "roundrobin"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/recipex_ab_vlan_004.xml b/recipes/team/recipex_ab_vlan_004.xml
new file mode 100644
index 0000000..ef65ee1
--- /dev/null
+++ b/recipes/team/recipex_ab_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_ab_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_bcast_vlan_004.xml b/recipes/team/recipex_bcast_vlan_004.xml
new file mode 100644
index 0000000..412e14e
--- /dev/null
+++ b/recipes/team/recipex_bcast_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_bcast_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_act_vlan_004.xml b/recipes/team/recipex_lacp_act_vlan_004.xml
new file mode 100644
index 0000000..da6e2c7
--- /dev/null
+++ b/recipes/team/recipex_lacp_act_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lacp_act_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_vlan_004.xml b/recipes/team/recipex_lacp_vlan_004.xml
new file mode 100644
index 0000000..606be37
--- /dev/null
+++ b/recipes/team/recipex_lacp_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lacp_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_act_vlan_004.xml b/recipes/team/recipex_lb_act_vlan_004.xml
new file mode 100644
index 0000000..faaed33
--- /dev/null
+++ b/recipes/team/recipex_lb_act_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lb_act_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_vlan_004.xml b/recipes/team/recipex_lb_vlan_004.xml
new file mode 100644
index 0000000..7931776
--- /dev/null
+++ b/recipes/team/recipex_lb_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lb_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_rr_vlan_004.xml b/recipes/team/recipex_rr_vlan_004.xml
new file mode 100644
index 0000000..483e6c2
--- /dev/null
+++ b/recipes/team/recipex_rr_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_rr_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
9 years, 9 months
[PATCH] Adding team-vlan iperf recipes
by Jan Tluka
Set of team recipes to test whether team driver can work with VLANs.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
recipes/team/interfaces/interfaces-simple_vlan.xml | 15 ++++++
.../team/interfaces/interfaces-team_ab_vlan.xml | 58 ++++++++++++++++++++++
.../team/interfaces/interfaces-team_bcast_vlan.xml | 32 ++++++++++++
.../interfaces/interfaces-team_lacp_act_vlan.xml | 49 ++++++++++++++++++
.../team/interfaces/interfaces-team_lacp_vlan.xml | 46 +++++++++++++++++
.../interfaces/interfaces-team_lb_act_vlan.xml | 38 ++++++++++++++
.../team/interfaces/interfaces-team_lb_vlan.xml | 36 ++++++++++++++
.../team/interfaces/interfaces-team_rr_vlan.xml | 32 ++++++++++++
recipes/team/recipex_ab_vlan_004.xml | 19 +++++++
recipes/team/recipex_bcast_vlan_004.xml | 19 +++++++
recipes/team/recipex_lacp_act_vlan_004.xml | 19 +++++++
recipes/team/recipex_lacp_vlan_004.xml | 19 +++++++
recipes/team/recipex_lb_act_vlan_004.xml | 19 +++++++
recipes/team/recipex_lb_vlan_004.xml | 19 +++++++
recipes/team/recipex_rr_vlan_004.xml | 19 +++++++
15 files changed, 439 insertions(+)
create mode 100644 recipes/team/interfaces/interfaces-simple_vlan.xml
create mode 100644 recipes/team/interfaces/interfaces-team_ab_vlan.xml
create mode 100644 recipes/team/interfaces/interfaces-team_bcast_vlan.xml
create mode 100644 recipes/team/interfaces/interfaces-team_lacp_act_vlan.xml
create mode 100644 recipes/team/interfaces/interfaces-team_lacp_vlan.xml
create mode 100644 recipes/team/interfaces/interfaces-team_lb_act_vlan.xml
create mode 100644 recipes/team/interfaces/interfaces-team_lb_vlan.xml
create mode 100644 recipes/team/interfaces/interfaces-team_rr_vlan.xml
create mode 100644 recipes/team/recipex_ab_vlan_004.xml
create mode 100644 recipes/team/recipex_bcast_vlan_004.xml
create mode 100644 recipes/team/recipex_lacp_act_vlan_004.xml
create mode 100644 recipes/team/recipex_lacp_vlan_004.xml
create mode 100644 recipes/team/recipex_lb_act_vlan_004.xml
create mode 100644 recipes/team/recipex_lb_vlan_004.xml
create mode 100644 recipes/team/recipex_rr_vlan_004.xml
diff --git a/recipes/team/interfaces/interfaces-simple_vlan.xml b/recipes/team/interfaces/interfaces-simple_vlan.xml
new file mode 100644
index 0000000..68420c4
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-simple_vlan.xml
@@ -0,0 +1,15 @@
+<interfaces>
+ <eth id="eth" label="net1"/>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="eth"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_ab_vlan.xml b/recipes/team/interfaces/interfaces-team_ab_vlan.xml
new file mode 100644
index 0000000..47b47ca
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_ab_vlan.xml
@@ -0,0 +1,58 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {"name": "activebackup"},
+ "link_watch": {"name": "ethtool"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": -10,
+ "sticky": true
+ }
+ </option>
+ </options>
+ </slave>
+ <slave id="2">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": 100
+ }
+ </option>
+ </options>
+ </slave>
+ <slave id="3">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": 50
+ }
+ </option>
+ </options>
+ </slave>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_bcast_vlan.xml b/recipes/team/interfaces/interfaces-team_bcast_vlan.xml
new file mode 100644
index 0000000..89f5d79
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_bcast_vlan.xml
@@ -0,0 +1,32 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <!--"hwaddr": "00:11:22:33:44:55",-->
+ <option name="teamd_config">
+ {
+ "runner": {"name": "broadcast"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_lacp_act_vlan.xml b/recipes/team/interfaces/interfaces-team_lacp_act_vlan.xml
new file mode 100644
index 0000000..a60e5a8
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_lacp_act_vlan.xml
@@ -0,0 +1,49 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <!--"hwaddr": "00:11:22:33:44:55",-->
+ <option name="teamd_config">
+ {
+ "runner": {
+ "name": "lacp",
+ "active": true,
+ "fast_rate": true,
+ "tx_hash": ["eth", "ipv4", "ipv6"],
+ "tx_balancer": {
+ "name": "basic"
+ }
+ },
+ "link_watch": {"name": "ethtool"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": -10
+ }
+ </option>
+ </options>
+ </slave>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_lacp_vlan.xml b/recipes/team/interfaces/interfaces-team_lacp_vlan.xml
new file mode 100644
index 0000000..6611cbd
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_lacp_vlan.xml
@@ -0,0 +1,46 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <!--"hwaddr": "00:11:22:33:44:55",-->
+ <option name="teamd_config">
+ {
+ "runner": {
+ "name": "lacp",
+ "active": true,
+ "fast_rate": true,
+ "tx_hash": ["eth", "ipv4", "ipv6"]
+ },
+ "link_watch": {"name": "ethtool"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1">
+ <options>
+ <option name="teamd_port_config">
+ {
+ "prio": -10
+ }
+ </option>
+ </options>
+ </slave>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_lb_act_vlan.xml b/recipes/team/interfaces/interfaces-team_lb_act_vlan.xml
new file mode 100644
index 0000000..8a2293b
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_lb_act_vlan.xml
@@ -0,0 +1,38 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {
+ "name": "loadbalance",
+ "tx_hash": ["eth", "ipv4", "ipv6"],
+ "tx_balancer": {
+ "name": "basic"
+ }
+ }
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_lb_vlan.xml b/recipes/team/interfaces/interfaces-team_lb_vlan.xml
new file mode 100644
index 0000000..7eb35c5
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_lb_vlan.xml
@@ -0,0 +1,36 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {
+ "name": "loadbalance",
+ "tx_hash": ["eth", "ipv4", "ipv6"]
+ }
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+
+</interfaces>
diff --git a/recipes/team/interfaces/interfaces-team_rr_vlan.xml b/recipes/team/interfaces/interfaces-team_rr_vlan.xml
new file mode 100644
index 0000000..cdf51f2
--- /dev/null
+++ b/recipes/team/interfaces/interfaces-team_rr_vlan.xml
@@ -0,0 +1,32 @@
+<interfaces>
+ <eth id="1" label="net1"/>
+ <eth id="2" label="net1"/>
+ <eth id="3" label="net1"/>
+ <team id="team">
+ <options>
+ <option name="teamd_config">
+ {
+ "hwaddr": "00:11:22:33:44:55",
+ "runner": {"name": "roundrobin"}
+ }
+ </option>
+ </options>
+ <slaves>
+ <slave id="1"/>
+ <slave id="2"/>
+ <slave id="3"/>
+ </slaves>
+ </team>
+ <vlan id="testiface">
+ <options>
+ <option name="vlan_tci" value="100"/>
+ </options>
+ <slaves>
+ <slave id="team"/>
+ </slaves>
+ <addresses>
+ <address value="{$testip}"/>
+ <address value="{$testip6}"/>
+ </addresses>
+ </vlan>
+</interfaces>
diff --git a/recipes/team/recipex_ab_vlan_004.xml b/recipes/team/recipex_ab_vlan_004.xml
new file mode 100644
index 0000000..ef65ee1
--- /dev/null
+++ b/recipes/team/recipex_ab_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_ab_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_bcast_vlan_004.xml b/recipes/team/recipex_bcast_vlan_004.xml
new file mode 100644
index 0000000..412e14e
--- /dev/null
+++ b/recipes/team/recipex_bcast_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_bcast_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_act_vlan_004.xml b/recipes/team/recipex_lacp_act_vlan_004.xml
new file mode 100644
index 0000000..da6e2c7
--- /dev/null
+++ b/recipes/team/recipex_lacp_act_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lacp_act_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_vlan_004.xml b/recipes/team/recipex_lacp_vlan_004.xml
new file mode 100644
index 0000000..606be37
--- /dev/null
+++ b/recipes/team/recipex_lacp_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lacp_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_act_vlan_004.xml b/recipes/team/recipex_lb_act_vlan_004.xml
new file mode 100644
index 0000000..faaed33
--- /dev/null
+++ b/recipes/team/recipex_lb_act_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lb_act_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_vlan_004.xml b/recipes/team/recipex_lb_vlan_004.xml
new file mode 100644
index 0000000..7931776
--- /dev/null
+++ b/recipes/team/recipex_lb_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lb_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_rr_vlan_004.xml b/recipes/team/recipex_rr_vlan_004.xml
new file mode 100644
index 0000000..483e6c2
--- /dev/null
+++ b/recipes/team/recipex_rr_vlan_004.xml
@@ -0,0 +1,19 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_rr_vlan.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple_vlan.xml"/>
+ </host>
+ </network>
+ <xi:include href="tasks/sequence_iperf.xml"/>
+</lnstrecipe>
--
1.8.1.4
9 years, 9 months
[lnst] Fix module-tool dependency issue during resource synchronization
by Jiří Pírko
commit 49b3b7a8b05d5f5a048676eba4814d4b276e88e4
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Wed Jun 11 10:52:45 2014 +0200
Fix module-tool dependency issue during resource synchronization
Version 2 of the patch. The change is that an user does not need to
specify the used tools they're retrieved from python-parsed source of
the test module.
Tested on TCPConnection module, works fine.
Original issue description:
We have currently two test modules that have dependency on a test_tool,
TCPConnection and Multicast which are wrappers around tcp_conn and
multicast test tools.
Reduced synchronization feature introduced a dependency bug. Since the
test module used in an lnst recipe does not have any information about
required test tool such tool will not be synchronized to lnst slave and
will end with an Exception like this:
Exception: CommandException: Tools 'tcp_conn' not found
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Common/Utils.py | 23 +++++++++++++++++++++++
lnst/Controller/NetTestController.py | 11 ++++++++++-
2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Common/Utils.py b/lnst/Common/Utils.py
index 3b00afb..d7dcda3 100644
--- a/lnst/Common/Utils.py
+++ b/lnst/Common/Utils.py
@@ -17,6 +17,8 @@ import hashlib
import tempfile
import subprocess
import errno
+import ast
+from _ast import Call, Attribute
from lnst.Common.ExecCmd import exec_cmd
def die_when_parent_die():
@@ -167,3 +169,24 @@ def mkdir_p(path):
pass
else:
raise
+
+def get_module_tools(module_path):
+ tools = []
+
+ f = open(module_path)
+
+ asttree = ast.parse(f.read())
+
+ for node in ast.walk(asttree):
+ if isinstance (node, Call):
+ fn = getattr(node, 'func')
+ if isinstance(fn, Attribute):
+ val = getattr(fn, 'value')
+ if ('self' == getattr(val, 'id')):
+ if ( 'exec_from' == getattr(fn, 'attr')):
+ tool = getattr((getattr(node, 'args')[0]), 's')
+ tools.append(tool)
+
+ f.close()
+
+ return tools
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 400cd19..527c640 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -23,7 +23,7 @@ from time import sleep
from xmlrpclib import Binary
from lnst.Common.NetUtils import MacPool
from lnst.Common.Utils import wait_for, md5sum, dir_md5sum, create_tar_archive
-from lnst.Common.Utils import check_process_running, bool_it
+from lnst.Common.Utils import check_process_running, bool_it, get_module_tools
from lnst.Common.NetTestCommand import NetTestCommandContext, NetTestCommand
from lnst.Common.NetTestCommand import str_command, CommandException
from lnst.Controller.RecipeParser import RecipeParser, RecipeError
@@ -242,6 +242,15 @@ class NetTestController:
mod = cmd['module']
if mod in res_table['module']:
sync_table['module'][mod] = res_table['module'][mod]
+ # check if test module uses some test tools
+ mod_path = res_table['module'][mod]["path"]
+ mod_tools = get_module_tools(mod_path)
+ for t in mod_tools:
+ if t in sync_table['tools']:
+ continue
+ logging.debug("Adding '%s' tool as dependency\
+ of %s test module" % (t, mod))
+ sync_table['tools'][t] = res_table['tools'][t]
else:
msg = "Module '%s' not found on the controller"\
% mod
9 years, 9 months
[PATCH v2] Fix module-tool dependency issue during resource synchronization
by Jan Tluka
Version 2 of the patch. The change is that an user does not need to
specify the used tools they're retrieved from python-parsed source of
the test module.
Tested on TCPConnection module, works fine.
Original issue description:
We have currently two test modules that have dependency on a test_tool,
TCPConnection and Multicast which are wrappers around tcp_conn and
multicast test tools.
Reduced synchronization feature introduced a dependency bug. Since the
test module used in an lnst recipe does not have any information about
required test tool such tool will not be synchronized to lnst slave and
will end with an Exception like this:
Exception: CommandException: Tools 'tcp_conn' not found
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Common/Utils.py | 24 ++++++++++++++++++++++++
lnst/Controller/NetTestController.py | 11 ++++++++++-
2 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/lnst/Common/Utils.py b/lnst/Common/Utils.py
index 3b00afb..b23c19e 100644
--- a/lnst/Common/Utils.py
+++ b/lnst/Common/Utils.py
@@ -17,6 +17,8 @@ import hashlib
import tempfile
import subprocess
import errno
+import ast
+from _ast import Call, Attribute
from lnst.Common.ExecCmd import exec_cmd
def die_when_parent_die():
@@ -167,3 +169,25 @@ def mkdir_p(path):
pass
else:
raise
+
+def get_module_tools(module_path):
+ tools = []
+
+ f = open(module_path)
+
+ asttree = ast.parse(f.read())
+
+ for node in ast.walk(asttree):
+ if isinstance (node, Call):
+ fn = getattr(node, 'func')
+ if isinstance(fn, Attribute):
+ val = getattr(fn, 'value')
+ if ('self' == getattr(val, 'id')):
+ if ( 'exec_from' == getattr(fn, 'attr')):
+ tool = getattr((getattr(node, 'args')[0]), 's')
+ tools.append(tool)
+
+ f.close()
+
+ return tools
+
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 400cd19..527c640 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -23,7 +23,7 @@ from time import sleep
from xmlrpclib import Binary
from lnst.Common.NetUtils import MacPool
from lnst.Common.Utils import wait_for, md5sum, dir_md5sum, create_tar_archive
-from lnst.Common.Utils import check_process_running, bool_it
+from lnst.Common.Utils import check_process_running, bool_it, get_module_tools
from lnst.Common.NetTestCommand import NetTestCommandContext, NetTestCommand
from lnst.Common.NetTestCommand import str_command, CommandException
from lnst.Controller.RecipeParser import RecipeParser, RecipeError
@@ -242,6 +242,15 @@ class NetTestController:
mod = cmd['module']
if mod in res_table['module']:
sync_table['module'][mod] = res_table['module'][mod]
+ # check if test module uses some test tools
+ mod_path = res_table['module'][mod]["path"]
+ mod_tools = get_module_tools(mod_path)
+ for t in mod_tools:
+ if t in sync_table['tools']:
+ continue
+ logging.debug("Adding '%s' tool as dependency\
+ of %s test module" % (t, mod))
+ sync_table['tools'][t] = res_table['tools'][t]
else:
msg = "Module '%s' not found on the controller"\
% mod
--
1.8.1.4
9 years, 9 months
[lnst] Adding TCPConnection test for team driver
by Jiří Pírko
commit 2da0db89fc626b5928b57cb92f2285678a8295f0
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Wed Jun 11 08:52:06 2014 +0200
Adding TCPConnection test for team driver
This patch adds TCPConnection test recipes for all team driver modes.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
recipes/team/recipex_ab_005.xml | 24 +++++++++
recipes/team/recipex_bcast_005.xml | 22 ++++++++
recipes/team/recipex_lacp_005.xml | 22 ++++++++
recipes/team/recipex_lacp_act_005.xml | 22 ++++++++
recipes/team/recipex_lb_005.xml | 22 ++++++++
recipes/team/recipex_lb_act_005.xml | 22 ++++++++
recipes/team/recipex_rr_005.xml | 22 ++++++++
recipes/team/tasks/sequence_tcp_connections.xml | 59 +++++++++++++++++++++++
8 files changed, 215 insertions(+), 0 deletions(-)
---
diff --git a/recipes/team/recipex_ab_005.xml b/recipes/team/recipex_ab_005.xml
new file mode 100644
index 0000000..0a7e4e3
--- /dev/null
+++ b/recipes/team/recipex_ab_005.xml
@@ -0,0 +1,24 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <params/>
+ <xi:include href="interfaces/interfaces-team_ab.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <params/>
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="10"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_bcast_005.xml b/recipes/team/recipex_bcast_005.xml
new file mode 100644
index 0000000..a208cc2
--- /dev/null
+++ b/recipes/team/recipex_bcast_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_bcast.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="10"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_005.xml b/recipes/team/recipex_lacp_005.xml
new file mode 100644
index 0000000..aa30ae0
--- /dev/null
+++ b/recipes/team/recipex_lacp_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lacp.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="30"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_act_005.xml b/recipes/team/recipex_lacp_act_005.xml
new file mode 100644
index 0000000..48bb8b8
--- /dev/null
+++ b/recipes/team/recipex_lacp_act_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lacp_act.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="30"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_005.xml b/recipes/team/recipex_lb_005.xml
new file mode 100644
index 0000000..24081a6
--- /dev/null
+++ b/recipes/team/recipex_lb_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lb.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="30"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_act_005.xml b/recipes/team/recipex_lb_act_005.xml
new file mode 100644
index 0000000..f43e2ff
--- /dev/null
+++ b/recipes/team/recipex_lb_act_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lb_act.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="30"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_rr_005.xml b/recipes/team/recipex_rr_005.xml
new file mode 100644
index 0000000..4141e0f
--- /dev/null
+++ b/recipes/team/recipex_rr_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_rr.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="10"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/tasks/sequence_tcp_connections.xml b/recipes/team/tasks/sequence_tcp_connections.xml
new file mode 100644
index 0000000..d48d7f9
--- /dev/null
+++ b/recipes/team/tasks/sequence_tcp_connections.xml
@@ -0,0 +1,59 @@
+<task>
+ <define>
+ <alias name="my_range" value="10000-10050" />
+ </define>
+
+ <define>
+ <alias name="debug" value="no"/>
+ </define>
+
+ <run module="TCPConnection" host="2" bg_id="server">
+ <options>
+ <option name="mode" value="server"/>
+ <option name="address" value="{ip(2,testiface)}"/>
+ <option name="portrange" value="{$my_range}"/>
+ <option name="continuous" value="yes"/>
+ <option name="debug" value="{$debug}"/>
+ </options>
+ </run>
+ <ctl_wait seconds="3"/>
+ <run module="TCPConnection" host="1" bg_id="client">
+ <options>
+ <option name="mode" value="client"/>
+ <option name="address" value="{ip(2,testiface)}"/>
+ <option name="portrange" value="{$my_range}"/>
+ <option name="continuous" value="yes"/>
+ <option name="debug" value="{$debug}"/>
+ </options>
+ </run>
+ <ctl_wait seconds="15"/>
+ <intr host="1" bg_id="client"/>
+ <intr host="2" bg_id="server"/>
+
+ <!-- ipv6 -->
+
+ <run module="TCPConnection" host="2" bg_id="server6">
+ <options>
+ <option name="mode" value="server"/>
+ <option name="address" value="{ip(2,testiface,1)}"/>
+ <option name="portrange" value="{$my_range}"/>
+ <option name="continuous" value="yes"/>
+ <option name="ipv6" value="yes"/>
+ <option name="debug" value="{$debug}"/>
+ </options>
+ </run>
+ <ctl_wait seconds="3"/>
+ <run module="TCPConnection" host="1" bg_id="client6">
+ <options>
+ <option name="mode" value="client"/>
+ <option name="address" value="{ip(2,testiface,1)}"/>
+ <option name="portrange" value="{$my_range}"/>
+ <option name="continuous" value="yes"/>
+ <option name="ipv6" value="yes"/>
+ <option name="debug" value="{$debug}"/>
+ </options>
+ </run>
+ <ctl_wait seconds="15"/>
+ <intr host="1" bg_id="client6"/>
+ <intr host="2" bg_id="server6"/>
+</task>
9 years, 9 months
[PATCH] Adding TCPConnection test for team driver
by Jan Tluka
This patch adds TCPConnection test recipes for all team driver modes.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
recipes/team/recipex_ab_005.xml | 24 ++++++++++
recipes/team/recipex_bcast_005.xml | 22 +++++++++
recipes/team/recipex_lacp_005.xml | 22 +++++++++
recipes/team/recipex_lacp_act_005.xml | 22 +++++++++
recipes/team/recipex_lb_005.xml | 22 +++++++++
recipes/team/recipex_lb_act_005.xml | 22 +++++++++
recipes/team/recipex_rr_005.xml | 22 +++++++++
recipes/team/tasks/sequence_tcp_connections.xml | 59 +++++++++++++++++++++++++
8 files changed, 215 insertions(+)
create mode 100644 recipes/team/recipex_ab_005.xml
create mode 100644 recipes/team/recipex_bcast_005.xml
create mode 100644 recipes/team/recipex_lacp_005.xml
create mode 100644 recipes/team/recipex_lacp_act_005.xml
create mode 100644 recipes/team/recipex_lb_005.xml
create mode 100644 recipes/team/recipex_lb_act_005.xml
create mode 100644 recipes/team/recipex_rr_005.xml
create mode 100644 recipes/team/tasks/sequence_tcp_connections.xml
diff --git a/recipes/team/recipex_ab_005.xml b/recipes/team/recipex_ab_005.xml
new file mode 100644
index 0000000..0a7e4e3
--- /dev/null
+++ b/recipes/team/recipex_ab_005.xml
@@ -0,0 +1,24 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <params/>
+ <xi:include href="interfaces/interfaces-team_ab.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <params/>
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="10"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_bcast_005.xml b/recipes/team/recipex_bcast_005.xml
new file mode 100644
index 0000000..a208cc2
--- /dev/null
+++ b/recipes/team/recipex_bcast_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_bcast.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="10"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_005.xml b/recipes/team/recipex_lacp_005.xml
new file mode 100644
index 0000000..aa30ae0
--- /dev/null
+++ b/recipes/team/recipex_lacp_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lacp.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="30"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lacp_act_005.xml b/recipes/team/recipex_lacp_act_005.xml
new file mode 100644
index 0000000..48bb8b8
--- /dev/null
+++ b/recipes/team/recipex_lacp_act_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lacp_act.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="30"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_005.xml b/recipes/team/recipex_lb_005.xml
new file mode 100644
index 0000000..24081a6
--- /dev/null
+++ b/recipes/team/recipex_lb_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lb.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="30"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_lb_act_005.xml b/recipes/team/recipex_lb_act_005.xml
new file mode 100644
index 0000000..f43e2ff
--- /dev/null
+++ b/recipes/team/recipex_lb_act_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_lb_act.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="30"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/recipex_rr_005.xml b/recipes/team/recipex_rr_005.xml
new file mode 100644
index 0000000..4141e0f
--- /dev/null
+++ b/recipes/team/recipex_rr_005.xml
@@ -0,0 +1,22 @@
+<lnstrecipe xmlns:xi="http://www.w3.org/2003/XInclude">
+ <network>
+ <define>
+ <alias name="testip" value="192.168.111.1/24"/>
+ <alias name="testip6" value="fe01::1/64"/>
+ </define>
+ <host id="1">
+ <xi:include href="interfaces/interfaces-team_rr.xml"/>
+ </host>
+ <define>
+ <alias name="testip" value="192.168.111.2/24"/>
+ <alias name="testip6" value="fe01::2/64"/>
+ </define>
+ <host id="2">
+ <xi:include href="interfaces/interfaces-simple.xml"/>
+ </host>
+ </network>
+ <task>
+ <ctl_wait seconds="10"/>
+ </task>
+ <xi:include href="tasks/sequence_tcp_connections.xml"/>
+</lnstrecipe>
diff --git a/recipes/team/tasks/sequence_tcp_connections.xml b/recipes/team/tasks/sequence_tcp_connections.xml
new file mode 100644
index 0000000..d48d7f9
--- /dev/null
+++ b/recipes/team/tasks/sequence_tcp_connections.xml
@@ -0,0 +1,59 @@
+<task>
+ <define>
+ <alias name="my_range" value="10000-10050" />
+ </define>
+
+ <define>
+ <alias name="debug" value="no"/>
+ </define>
+
+ <run module="TCPConnection" host="2" bg_id="server">
+ <options>
+ <option name="mode" value="server"/>
+ <option name="address" value="{ip(2,testiface)}"/>
+ <option name="portrange" value="{$my_range}"/>
+ <option name="continuous" value="yes"/>
+ <option name="debug" value="{$debug}"/>
+ </options>
+ </run>
+ <ctl_wait seconds="3"/>
+ <run module="TCPConnection" host="1" bg_id="client">
+ <options>
+ <option name="mode" value="client"/>
+ <option name="address" value="{ip(2,testiface)}"/>
+ <option name="portrange" value="{$my_range}"/>
+ <option name="continuous" value="yes"/>
+ <option name="debug" value="{$debug}"/>
+ </options>
+ </run>
+ <ctl_wait seconds="15"/>
+ <intr host="1" bg_id="client"/>
+ <intr host="2" bg_id="server"/>
+
+ <!-- ipv6 -->
+
+ <run module="TCPConnection" host="2" bg_id="server6">
+ <options>
+ <option name="mode" value="server"/>
+ <option name="address" value="{ip(2,testiface,1)}"/>
+ <option name="portrange" value="{$my_range}"/>
+ <option name="continuous" value="yes"/>
+ <option name="ipv6" value="yes"/>
+ <option name="debug" value="{$debug}"/>
+ </options>
+ </run>
+ <ctl_wait seconds="3"/>
+ <run module="TCPConnection" host="1" bg_id="client6">
+ <options>
+ <option name="mode" value="client"/>
+ <option name="address" value="{ip(2,testiface,1)}"/>
+ <option name="portrange" value="{$my_range}"/>
+ <option name="continuous" value="yes"/>
+ <option name="ipv6" value="yes"/>
+ <option name="debug" value="{$debug}"/>
+ </options>
+ </run>
+ <ctl_wait seconds="15"/>
+ <intr host="1" bg_id="client6"/>
+ <intr host="2" bg_id="server6"/>
+</task>
--
1.8.1.4
9 years, 9 months