# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1213711149 25200
# Node ID 9700e5130a511e8a5457ba3033eb57d7b0b6a656
# Parent 6652ca49942c0314ec1b2b1da504810325097250
[TEST] Modifying the vxml.py
1) Added xml_get_net_network() to get the network name.
2) Fixed the set_nettype().
These changes are needed to support the 05_RAPF_err.py tc.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 6652ca49942c -r 9700e5130a51 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jun 12 17:13:23 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Jun 17 06:59:09 2008 -0700
@@ -310,8 +310,12 @@
bridge=bridgename)
def set_nettype(self, nettype):
- self.set_attributes('/domain/devices/interface/type',
+ self.set_attributes('/domain/devices/interface',
type=nettype)
+
+ def set_net_name(self, netname):
+ self.set_attributes('/domain/devices/interface/source',
+ network=netname)
def set_diskimg(self, diskimg):
self.set_attributes('/domain/devices/disk/source', file=diskimg)
@@ -403,6 +407,12 @@
bridgeStr = self.get_value_xpath(
'/domain/devices/interface/source/@bridge')
return bridgeStr
+
+ def xml_get_net_network(self):
+ networkStr = self.get_value_xpath(
+ '/domain/devices/interface/source/@network')
+ return networkStr
+
def dumpxml(self, ip):
cmd = 'virsh -c %s dumpxml %s' % (self.vuri, self.dname)