commit 9ebebdd7b00c45dd249a6e4249aa1b023b15b411
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Thu Apr 18 19:51:57 2013 +0200
smoke-tests: Changing the XML format
The XML format has changed (again) recently. This patch fixes the smoke
tests so they are usable with the new XMLs.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
lnst/Common/XmlTemplates.py | 12 ++++++------
recipes/smoke/lib/conf-bond.xml | 8 ++++----
recipes/smoke/lib/conf-eth.xml | 6 +++---
recipes/smoke/lib/conf-team.xml | 8 ++++----
recipes/smoke/lib/conf-vlan.xml | 6 +++---
recipes/smoke/lib/recipe-temp.xml | 6 ++----
recipes/smoke/lib/req.xml | 14 --------------
7 files changed, 22 insertions(+), 38 deletions(-)
---
diff --git a/lnst/Common/XmlTemplates.py b/lnst/Common/XmlTemplates.py
index 3664c1e..28a6d51 100644
--- a/lnst/Common/XmlTemplates.py
+++ b/lnst/Common/XmlTemplates.py
@@ -233,12 +233,12 @@ class XmlTemplates:
"Interface %s does not exist." % if_id
raise XmlTemplateError(msg)
- #try:
- addr = iface.get_address(ip_id)
- #except:
- # msg = "Third parameter of function ip() is invalid: "\
- # "Address %s does not exist." % ip_id
- # raise XmlTemplateError(msg)
+ try:
+ addr = iface.get_address(ip_id)
+ except:
+ msg = "Third parameter of function ip() is invalid: "\
+ "Address %s does not exist." % ip_id
+ raise XmlTemplateError(msg)
return addr.split('/')[0]
diff --git a/recipes/smoke/lib/conf-bond.xml b/recipes/smoke/lib/conf-bond.xml
index 7e78719..b69401d 100644
--- a/recipes/smoke/lib/conf-bond.xml
+++ b/recipes/smoke/lib/conf-bond.xml
@@ -1,6 +1,6 @@
-<netconfig>
- <interface id="if-1" phys_id="dev-1"
type="eth"/>
- <interface id="if-2" phys_id="dev-2"
type="eth"/>
+<interfaces>
+ <interface id="if-1" network="net" type="eth"/>
+ <interface id="if-2" network="net" type="eth"/>
<interface id="testiface" type="bond">
<slaves>
<slave id="if-1"/>
@@ -10,4 +10,4 @@
<address value="{$testip}"/>
</addresses>
</interface>
-</netconfig>
+</interfaces>
diff --git a/recipes/smoke/lib/conf-eth.xml b/recipes/smoke/lib/conf-eth.xml
index 6df4cfb..a31e095 100644
--- a/recipes/smoke/lib/conf-eth.xml
+++ b/recipes/smoke/lib/conf-eth.xml
@@ -1,7 +1,7 @@
-<netconfig>
- <interface id="testiface" phys_id="dev-1"
type="eth">
+<interfaces>
+ <interface id="testiface" network="net"
type="eth">
<addresses>
<address value="{$testip}"/>
</addresses>
</interface>
-</netconfig>
+</interfaces>
diff --git a/recipes/smoke/lib/conf-team.xml b/recipes/smoke/lib/conf-team.xml
index 08bc7d5..f8e23c6 100644
--- a/recipes/smoke/lib/conf-team.xml
+++ b/recipes/smoke/lib/conf-team.xml
@@ -1,6 +1,6 @@
-<netconfig>
- <interface id="if-1" phys_id="dev-1"
type="eth"/>
- <interface id="if-2" phys_id="dev-2"
type="eth"/>
+<interfaces>
+ <interface id="if-1" network="net" type="eth"/>
+ <interface id="if-2" network="net" type="eth"/>
<interface id="testiface" type="team">
<options>
<option name="teamd_config">
@@ -17,4 +17,4 @@
<address value="{$testip}"/>
</addresses>
</interface>
-</netconfig>
+</interfaces>
diff --git a/recipes/smoke/lib/conf-vlan.xml b/recipes/smoke/lib/conf-vlan.xml
index 872c4b4..aa95e5a 100644
--- a/recipes/smoke/lib/conf-vlan.xml
+++ b/recipes/smoke/lib/conf-vlan.xml
@@ -1,5 +1,5 @@
-<netconfig>
- <interface id="if-1" phys_id="dev-1"
type="eth"/>
+<interfaces>
+ <interface id="if-1" network="net" type="eth"/>
<interface id="testiface" type="vlan">
<options>
<option name="vlan_tci" value="10"/>
@@ -11,4 +11,4 @@
<address value="{$testip}"/>
</addresses>
</interface>
-</netconfig>
+</interfaces>
diff --git a/recipes/smoke/lib/recipe-temp.xml b/recipes/smoke/lib/recipe-temp.xml
index 2578cca..ab06173 100644
--- a/recipes/smoke/lib/recipe-temp.xml
+++ b/recipes/smoke/lib/recipe-temp.xml
@@ -4,15 +4,13 @@
<define>
<alias name="testip"
value="192.168.100.240/24"/>
</define>
- <requirements source="../lib/req.xml"/>
- <netconfig source="#CONF1#"/>
+ <interfaces source="#CONF1#"/>
</machine>
<machine id="2">
<define>
<alias name="testip"
value="192.168.100.215/24"/>
</define>
- <requirements source="../lib/req.xml"/>
- <netconfig source="#CONF2#"/>
+ <interfaces source="#CONF2#"/>
</machine>
</machines>
#SEQUENCES#
Show replies by thread