yunguol(a)cn.ibm.com wrote:
# HG changeset patch
# User root(a)elm3b197.beaverton.ibm.com
# Date 1217987020 25200
# Node ID f50bfc180219f6cca02e73b55ec4472b07bc64ac
# Parent 3add446da91108d419ce8adae434ebc78039fa34
[TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new
one
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3add446da911 -r f50bfc180219
suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05
08:59:29 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05
18:43:40 2008 -0700
@@ -171,7 +171,7 @@ def main():
if status != PASS:
return status
- status, test_network = create_netpool_conf(server, virt)
+ status, test_network = create_netpool_conf(server, virt, use_existing=True)
This fix works fine for this test case.
The actual reason for this test case to fail is bcs of the difference in
the networkpool used to define the guest and the pool used in the
create_netpool_conf().
If we see the _set_vbridge() or set_vnetwork() of the vxml.py they make
use of the networkpool/bridge information if they already exist or they
create one, see below:
def _set_vbridge(self, ip, virt_type):
network_list = live.net_list(ip, virt=virt_type)
if len(network_list) > 0:
vbr = live.get_bridge_from_network_xml(network_list[0], ip,
virt = virt_type)
else:
logger.info('No virutal network found')
logger.info('Trying to create one ......')
netxml = NetXML(ip, virt=virt_type)
....................
AND
def set_vnetwork(self, interface, virt_type):
network_list = live.net_list(CIM_IP, virt_type)
if len(network_list) > 0:
nname = network_list[0]
else:
logger.info('No virutal network found')
logger.info('Trying to create one ......')
netxml = NetXML(CIM_IP, virt=virt_type)
ret = netxml.create_vnet()
1) We might have to sync the function _set_vbridge() and set_vnetwork()
to something similar to create_netpool_conf() funtion.
OR
And also, we do not need create_netpool_conf() in this test case as the
call to vxml.define will internally call set_interface_details() and
assign the network information accordingly.
2) Removing the create_netpool_conf() and either getting the bridge name
using xml_get_net_bridge() or network name info by using
xml_get_net_network() will also solve the failure seen in the test case.
I think we should go with the approach 2 to solve the above test case
problem, any thoughts ??
Thanks and Regards,
Deepti.
if status != PASS:
return status
@@ -184,7 +184,6 @@ def main():
return status
cleanup_restore(server, virt)
- destroy_netpool(server, virt, test_network)
vsxml.undefine(server)
return status
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim