[PATCH] [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one

# HG changeset patch # User root@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@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) 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

yunguol@cn.ibm.com wrote:
# HG changeset patch # User root@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@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@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim

Also, for the part of the tc below: for rasd_cn, id_info in cn_id_list.iteritems(): status = get_rasdinst_verify_pool_from_RAFP(server, virt, vsxml, rasd_cn, id_info) if status != PASS: return status Please include the following for status != PASS: cleanup_restore(server, virt) destroy_netpool(server, virt, test_network) vsxml.undefine(server) Thanks and Regards, Deepti. Deepti B Kalakeri wrote:
yunguol@cn.ibm.com wrote:
# HG changeset patch # User root@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@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@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim

Deepti B Kalakeri wrote:
Also, for the part of the tc below: for rasd_cn, id_info in cn_id_list.iteritems(): status = get_rasdinst_verify_pool_from_RAFP(server, virt, vsxml, rasd_cn, id_info) if status != PASS: return status
Please include the following for status != PASS: cleanup_restore(server, virt) destroy_netpool(server, virt, test_network)
This won't be needed if the create_netpool_conf() function is removed.
vsxml.undefine(server)
get_rasdinst_verify_pool_from_RAFP() handles the undefine() already. But I think the undefine() calls should be removed from the get_rasdinst_verify_pool_from_RAFP() call and instead handled as you say Deepti - by something like the following: status != PASS: cleanup_restore(server, virt) vsxml.undefine(server) -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

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 ??
Agreed. I think this is the best approach. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

libvirt-cim-bounces@redhat.com wrote on 2008-08-06 17:50:02:
yunguol@cn.ibm.com wrote:
# HG changeset patch # User root@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@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 ??
Excellent! Done with approach 2.
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@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
participants (4)
-
Deepti B Kalakeri
-
Guo Lian Yun
-
Kaitlin Rupert
-
yunguol@cn.ibm.com