[PATCH] [TEST] #2 Updating 01_forward.py of SDC

# HG changeset patch # User Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1210765634 25200 # Node ID 128d23c76793c50f827372963acf29db57663a87 # Parent 6671b339cc8fd7c2cc7cada2ac15bc93635fbe4b [TEST] #2 Updating 01_forward.py of SDC. To use the storage pool present on the machine. This tc will now pass on latest libvirt-cim for KVM. This tc will require virsh_version() and diskpool_list() and create_diskpool() function changes to work. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> diff -r 6671b339cc8f -r 128d23c76793 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed May 14 04:45:49 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed May 14 04:47:14 2008 -0700 @@ -57,19 +57,16 @@ from distutils.file_util import move_fil from distutils.file_util import move_file from XenKvmLib import assoc from XenKvmLib import enumclass -from XenKvmLib.test_xml import netxml -from XenKvmLib.test_doms import create_vnet -from VirtLib.live import net_list +from VirtLib.live import virsh_version from CimTest.ReturnCodes import PASS, FAIL, SKIP from CimTest.Globals import do_main, platform_sup, logger, \ CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS from XenKvmLib.classes import get_typed_class -from XenKvmLib.common_util import cleanup_restore, test_dpath, \ -create_diskpool_file +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf, \ +create_netpool_conf from XenKvmLib.common_util import print_field_error from XenKvmLib.const import CIM_REV -diskid = "%s/%s" % ("DiskPool", test_dpath) memid = "%s/%s" % ("MemoryPool", 0) procid = "%s/%s" % ("ProcessorPool", 0) libvirtcim_sdc_rasd_rev = 571 @@ -130,22 +127,17 @@ def get_pool_details(virt, server): def get_pool_details(virt, server): dpool = npool = mpool = ppool = None try : + status, diskid = create_diskpool_conf(server, virt) + if status != PASS: + return status, dpool, npool, mpool, ppool + dpool = get_pool_info(virt, server, diskid, poolname="DiskPool") mpool = get_pool_info(virt, server, memid, poolname= "MemoryPool") ppool = get_pool_info(virt, server, procid, poolname= "ProcessorPool") - vir_network = net_list(server, virt) - if len(vir_network) > 0: - test_network = vir_network[0] - else: - bridgename = 'testbridge' - test_network = 'default-net' - net_xml, bridge = netxml(server, bridgename, test_network) - ret = create_vnet(server, net_xml, virt) - if not ret: - logger.error("Failed to create Virtual Network '%s'", - test_network) - return SKIP + status, test_network = create_netpool_conf(server, virt) + if status != PASS: + return status, dpool, npool, mpool, ppool netid = "%s/%s" % ("NetworkPool", test_network) npool = get_pool_info(virt, server, netid, poolname= "NetworkPool") @@ -225,11 +217,6 @@ def main(): server = options.ip virt = options.virt - # Verify DiskPool on machine - status = create_diskpool_file() - if status != PASS: - return status - status, dpool, npool, mpool, ppool = get_pool_details(virt, server) if status != PASS or dpool.InstanceID == None or mpool.InstanceID == None \ or npool.InstanceID == None or ppool.InstanceID == None:

Deepti B. Kalakeri wrote:
# HG changeset patch # User Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1210765634 25200 # Node ID 128d23c76793c50f827372963acf29db57663a87 # Parent 6671b339cc8fd7c2cc7cada2ac15bc93635fbe4b [TEST] #2 Updating 01_forward.py of SDC.
To use the storage pool present on the machine. This tc will now pass on latest libvirt-cim for KVM. This tc will require virsh_version() and diskpool_list() and create_diskpool() function changes to work.
Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com>
diff -r 6671b339cc8f -r 128d23c76793 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
No complaints here - this should be ready to apply once the patches it is dependent on are in the tree. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Deepti B. Kalakeri
-
Kaitlin Rupert