KVM test report on Fedora 9 (05/19)
by Guo Lian Yun
stro: Fedora 9 Beta
Kernel: 2.6.25-0.121.rc5.git4.fc9
Libvirt: 0.4.1-7.fc9
CIMOM: 2.7.0-6.fc9
PyWBEM: 0.6-1
libcmpiutil: 0.3-1.fc9
libvirt-cim: 0.3-4.fc9
cimtest: changeset-139
=================== FAIL ===========================================
ComputerSystemIndication - 01_created_indication.py: FAIL
ElementConforms - 02_reverse.py: FAIL
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: FAIL
NetworkPort - 03_user_netport.py: FAIL
SettingsDefine - 02_reverse.py: FAIL
VirtualSystemManagementService - 06_addresource.py: FAIL
========FULL CIMTEST REPORT=PASS(96)=FAIL(6)=SKIP(18)=XFAIL(9)=======
AllocationCapabilities - 01_enum.py: PASS
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
ComputerSystem - 01_enum.py: PASS
ComputerSystem - 02_nosystems.py: PASS
ComputerSystem - 03_defineVS.py: PASS
ComputerSystem - 04_defineStartVS.py: PASS
ComputerSystem - 05_activate_defined_start.py: XFAIL Bug: 85769
ComputerSystem - 06_paused_active_suspend.py: XFAIL Bug: 85769
ComputerSystem - 22_define_suspend.py: PASS
ComputerSystem - 23_suspend_suspend.py: SKIP
ComputerSystem - 27_define_suspend_errs.py: SKIP
ComputerSystem - 32_start_reboot.py: SKIP
ComputerSystem - 33_suspend_reboot.py: SKIP
ComputerSystem - 35_start_reset.py: SKIP
ComputerSystem - 40_RSC_start.py: XFAIL Bug: 91410
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed
Bug:<91410>
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystem - 42_cs_gi_errs.py: PASS
ElementAllocatedFromPool - 01_forward.py: SKIP
ElementAllocatedFromPool - 02_reverse.py: SKIP
ElementAllocatedFromPool - 03_reverse_errs.py: XFAIL Bug: 88651
ElementAllocatedFromPool - 04_forward_errs.py: XFAIL Bug: 88651
ElementCapabilities - 01_forward.py: PASS
ElementCapabilities - 02_reverse.py: PASS
ElementCapabilities - 03_forward_errs.py: PASS
ElementCapabilities - 04_reverse_errs.py: PASS
ElementCapabilities - 05_hostsystem_cap.py: PASS
ElementConforms - 01_forward.py: PASS
ElementConforms - 02_reverse.py: FAIL
ElementConforms - 03_ectp_fwd_errs.py: XFAIL Bug: 92642
Bug:<92642>
Bug:<92642>
Bug:<92642>
ElementConforms - 04_ectp_rev_errs.py: XFAIL Bug: 92642
Bug:<92642>
Bug:<92642>
Bug:<92642>
Bug:<92642>
Bug:<92642>
Bug:<92642>
Bug:<92642>
Bug:<92642>
ElementSettingData - 01_forward.py: PASS
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: FAIL
EnabledLogicalElementCapabilities - 01_enum.py: PASS
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
HostSystem - 01_enum.py: PASS
HostSystem - 02_hostsystem_to_rasd.py: PASS
HostSystem - 03_hs_to_settdefcap.py: PASS
HostSystem - 04_hs_to_EAPF.py: SKIP
HostSystem - 05_hs_gi_errs.py: PASS
HostSystem - 06_hs_to_vsms.py: PASS
HostedDependency - 01_forward.py: PASS
HostedDependency - 02_reverse.py: PASS
HostedDependency - 03_enabledstate.py: PASS
HostedDependency - 04_reverse_errs.py: PASS
HostedResourcePool - 01_forward.py: PASS
HostedResourcePool - 02_reverse.py: PASS
HostedResourcePool - 03_forward_errs.py: PASS
HostedResourcePool - 04_reverse_errs.py: PASS
HostedService - 01_forward.py: PASS
HostedService - 02_reverse.py: PASS
HostedService - 03_forward_errs.py: PASS
HostedService - 04_reverse_errs.py: PASS
LogicalDisk - 01_disk.py: PASS
LogicalDisk - 02_nodevs.py: PASS
LogicalDisk - 03_ld_gi_errs.py: PASS
Memory - 01_memory.py: PASS
Memory - 02_defgetmem.py: PASS
Memory - 03_mem_gi_errs.py: PASS
NetworkPort - 01_netport.py: PASS
NetworkPort - 02_np_gi_errors.py: PASS
NetworkPort - 03_user_netport.py: FAIL
Processor - 01_processor.py: PASS
Processor - 02_definesys_get_procs.py: PASS
Processor - 03_proc_gi_errs.py: PASS
Profile - 01_enum.py: PASS
Profile - 02_profile_to_elec.py: SKIP
Profile - 03_rprofile_gi_errs.py: SKIP
RASD - 01_verify_rasd_fields.py: PASS
RASD - 02_enum.py: PASS
RASD - 03_rasd_errs.py: PASS
ReferencedProfile - 01_verify_refprof.py: SKIP
ReferencedProfile - 02_refprofile_errs.py: SKIP
ResourceAllocationFromPool - 01_forward.py: PASS
ResourceAllocationFromPool - 02_reverse.py: PASS
ResourceAllocationFromPool - 03_forward_errs.py: PASS
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
ResourcePool - 01_enum.py: PASS
ResourcePool - 02_rp_gi_errors.py: PASS
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
ResourcePoolConfigurationService - 01_enum.py: PASS
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: XFAIL
Bug: 92173
InvokeMethod(AddResourcesToResourcePool): CIM_ERR_FAILED: Unknown Method
Bug:<92173>
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py:
PASS
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
SettingsDefine - 01_forward.py: PASS
SettingsDefine - 02_reverse.py: FAIL
SettingsDefine - 03_sds_fwd_errs.py: PASS
SettingsDefine - 04_sds_rev_errs.py: PASS
SettingsDefineCapabilities - 01_forward.py: PASS
SettingsDefineCapabilities - 03_forward_errs.py: PASS
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
SystemDevice - 01_forward.py: PASS
SystemDevice - 02_reverse.py: PASS
SystemDevice - 03_fwderrs.py: PASS
VSSD - 01_enum.py: PASS
VSSD - 02_bootldr.py: SKIP
VSSD - 03_vssd_gi_errs.py: PASS
VSSD - 04_vssd_to_rasd.py: PASS
VirtualSystemManagementCapabilities - 01_enum.py: PASS
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
VirtualSystemManagementService - 01_definesystem_name.py: PASS
VirtualSystemManagementService - 02_destroysystem.py: PASS
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
VirtualSystemManagementService - 06_addresource.py: FAIL
InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Failed to create domain
VirtualSystemManagementService - 07_addresource_neg.py: PASS
VirtualSystemManagementService - 08_modifyresource.py: XFAIL Bug: 90853
InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Failed to create
domain
Bug:<90853>
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationSettingData - 01_enum.py: PASS
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
VirtualSystemSettingDataComponent - 01_forward.py: SKIP
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
VirtualSystemSnapshotService - 01_enum.py: PASS
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py:
PASS
Best,
Regards
Daisy (运国莲)
IBM STG Greater China Development Lab, Shanghai
E-mail: yunguol(a)cn.ibm.com
TEL: (86)-21-60922144
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203
16 years, 7 months
[PATCH] [TEST] 2# Adding create_diskpool() function
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1210856720 25200
# Node ID 3c476a21c4b4f95f5ff783a199a6feab9d9c66b1
# Parent a8dbad0a9854623167932386e4bae8a737b46672
[TEST] 2# Adding create_diskpool() function.
Modified vxml to get the poolname and networkname .
To create the storage pool on machine with libvirt >= 0.4.1
Addressed the review comment.
Added logic to skip the removal of the diskconf file when libvirt >= 0.4.1 and CIM_REV > 558.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r a8dbad0a9854 -r 3c476a21c4b4 suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu May 15 04:51:47 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu May 15 06:05:20 2008 -0700
@@ -1,3 +1,4 @@
+#!/usr/bin/python
#
# Copyright 2008 IBM Corp.
#
@@ -33,6 +34,8 @@ from CimTest.Globals import logger, log_
from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
from XenKvmLib.const import CIM_REV
+from VirtLib.live import diskpool_list, virsh_version, net_list
+from XenKvmLib.vxml import PoolXML, NetXML
test_dpath = "foo"
diskpoolconf_rev = 558
@@ -265,12 +268,20 @@ def conf_file():
return status
-def cleanup_restore():
+def cleanup_restore(server, virt):
"""
Restoring back the original diskpool.conf
file.
"""
status = PASS
+ libvirt_version = virsh_version(server, virt)
+ # The conf file is not present on the machine if
+ # libvirt_version >= 0.4.1 and CIM_REV > 558
+ # Hence Skipping the logic to delete the new conf file
+ # and just returning PASS
+ if libvirt_version >= '0.4.1' and \
+ CIM_REV > diskpoolconf_rev:
+ return status
try:
if os.path.exists(back_disk_file):
os.remove(disk_file)
@@ -294,3 +305,57 @@ def create_diskpool_file():
return conf_file()
+def create_diskpool(server, virt='KVM'):
+ status = PASS
+ dpoolname = None
+ try:
+ dpool_list = diskpool_list(server, virt='KVM')
+ if len(dpool_list) > 0:
+ dpoolname=dpool_list[0]
+ else:
+ diskxml = PoolXML(server, virt=virt)
+ ret = diskxml.create_vpool()
+ if not ret:
+ logger.error('Failed to create the disk pool "%s"',
+ dpoolname)
+ status = FAIL
+ else:
+ dpoolname=diskxml.xml_get_diskpool_name()
+ except Exception, detail:
+ logger.error("Exception: In fn create_diskpool(): %s", detail)
+ status=FAIL
+ return status, dpoolname
+
+def create_diskpool_conf(server, virt):
+ libvirt_version = virsh_version(server, virt)
+ if libvirt_version >= '0.4.1' and \
+ CIM_REV > diskpoolconf_rev:
+ status, dpoolname = create_diskpool(server, virt=virt)
+ diskid = "%s/%s" % ("DiskPool", dpoolname)
+ else:
+ status = create_diskpool_file()
+ diskid = "%s/%s" % ("DiskPool", test_dpath)
+
+ return status, diskid
+
+
+def create_netpool_conf(server, virt):
+ status = PASS
+ test_network = None
+ try:
+ vir_network = net_list(server, virt)
+ if len(vir_network) > 0:
+ test_network = vir_network[0]
+ else:
+ netxml = NetXML(server, virt=virt)
+ ret = netxml.create_vnet()
+ if not ret:
+ logger.error("Failed to create Virtual Network '%s'",
+ test_network)
+ status = FAIL
+ else:
+ test_network = netxml.xml_get_netpool_name()
+ except Exception, detail:
+ logger.error("Exception: In fn create_netpool_conf(): %s", detail)
+ status=FAIL
+ return status, test_network
16 years, 7 months
[PATCH] [TEST] Adding missing xml_get_netpool_name() and xml_get_diskpool_name() function
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1211170937 -19800
# Node ID 0555fb6ce718280349929a31724301e3b923abf9
# Parent a8dbad0a9854623167932386e4bae8a737b46672
[TEST] Adding missing xml_get_netpool_name() and xml_get_diskpool_name() function.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r a8dbad0a9854 -r 0555fb6ce718 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu May 15 04:51:47 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon May 19 09:52:17 2008 +0530
@@ -213,6 +213,11 @@ class NetXML(Virsh, XMLClass):
def create_vnet(self):
return self.run(self.server, 'net-create', self.xml_string)
+ def xml_get_netpool_name(self):
+ npoolname = self.get_value_xpath('/network/name')
+ return npoolname
+
+
class PoolXML(Virsh, XMLClass):
def __init__(self, server, poolname=const.default_pool_name,
@@ -235,6 +240,11 @@ class PoolXML(Virsh, XMLClass):
def destroy_vpool(self):
return self.run(self.server, 'pool-destroy', self.pool_name)
+
+ def xml_get_diskpool_name(self):
+ dpoolname = self.get_value_xpath('/pool/name')
+ return dpoolname
+
class VirtXML(Virsh, XMLClass):
"""Base class for all XML generation & operation"""
16 years, 7 months
[PATCH] Verify migration type is supported VSMigrationService
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1210899399 25200
# Node ID 0455d746cfe9a3da08144d8e9c309de2e4ee6a3b
# Parent b9ddfef54aa7b51515efea27b95faf00edc5ace7
Verify migration type is supported VSMigrationService.
The check call doesn't verify that type supplied is one of the values we support. Also, allow for NULL in get_migration_type().
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r b9ddfef54aa7 -r 0455d746cfe9 src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Mon May 12 16:11:58 2008 -0700
+++ b/src/Virt_VSMigrationService.c Thu May 15 17:56:39 2008 -0700
@@ -109,14 +109,24 @@
uint16_t *type)
{
CMPIStatus s = {CMPI_RC_OK, NULL};
- int ret;
+ uint16_t _type;
- ret = cu_get_u16_prop(msd, "MigrationType", type);
- if (ret != CMPI_RC_OK) {
+ if (cu_get_u16_prop(msd, "MigrationType", &_type) != CMPI_RC_OK) {
CU_DEBUG("Using default MigrationType: %d", CIM_MIGRATE_LIVE);
- *type = CIM_MIGRATE_LIVE;
+ _type = CIM_MIGRATE_LIVE;
}
+ if ((_type < CIM_MIGRATE_OTHER) || (_type > CIM_MIGRATE_RESTART)) {
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unsupported migration type %d", _type);
+ goto out;
+ }
+
+ if (type != NULL)
+ *type = _type;
+
+ out:
return s;
}
@@ -543,7 +553,6 @@
virConnectPtr dconn = NULL;
uint32_t retcode = CIM_SVPC_RETURN_COMPLETED;
CMPIBoolean isMigratable = 0;
- uint16_t type;
virDomainPtr dom = NULL;
CMPIInstance *dominst;
const char *domain;
@@ -556,7 +565,7 @@
goto out;
}
- s = get_msd_values(ref, destination, argsin, &type, &dconn);
+ s = get_msd_values(ref, destination, argsin, NULL, &dconn);
if (s.rc != CMPI_RC_OK)
goto out;
16 years, 7 months
[PATCH] [TEST] #3 Updating 01_forward.py of SDC
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1210856837 25200
# Node ID fa608cfd2be35b4170e14620253f95a9b0e016ed
# Parent 3c476a21c4b4f95f5ff783a199a6feab9d9c66b1
[TEST] #3 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.
Update the cleanup_restore() function parameters.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 3c476a21c4b4 -r fa608cfd2be3 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Thu May 15 06:05:20 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Thu May 15 06:07:17 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
@@ -86,7 +83,7 @@ def get_or_bail(virt, ip, id, pool_class
except Exception, detail:
logger.error(CIM_ERROR_GETINSTANCE, '%s' % pool_class)
logger.error("Exception: %s", detail)
- cleanup_restore()
+ cleanup_restore(ip, virt)
sys.exit(FAIL)
return instance
@@ -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,19 +217,14 @@ 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:
- cleanup_restore()
+ cleanup_restore(server, virt)
return FAIL
status = verify_sdc_with_ac(virt, server, dpool, npool, mpool, ppool)
- cleanup_restore()
+ cleanup_restore(server, virt)
return status
if __name__ == "__main__":
16 years, 7 months
CimTest Report on XenFV 15-05-2008
by Deepti B Kalakeri
======================================
CIM Test Report for XenFV
======================================
Distro : RHEL 5.2 Beta
Kernel : 2.6.18-88.el5xen
Xen version : 3.1.2-88.el5
Libvirt : libvirt-0.3.3-7.el5
CIMOM : pegasus
PyWBEM : pywbem-3.14
CIM Schema : cimv216Experimental
LibCMPIutil : 78
LibVirtCIM : 587
CIMTEST : 138
======================================
PASS : 85
FAIL : 18
XFAIL : 4
SKIP : 22
-----------------
Total : 129
======================================
List of tc that are failing
ComputerSystem - 04_defineStartVS.py: FAIL
ComputerSystem - 06_paused_active_suspend.py: FAIL
ComputerSystem - 23_suspend_suspend.py: FAIL
ComputerSystem - 32_start_reboot.py: FAIL
ComputerSystem - 33_suspend_reboot.py: FAIL
ComputerSystem - 35_start_reset.py: FAIL
ElementAllocatedFromPool - 04_forward_errs.py: FAIL
ElementCapabilities - 01_forward.py: FAIL
ElementConforms - 01_forward.py: FAIL
EnabledLogicalElementCapabilities - 01_enum.py: FAIL
HostSystem - 03_hs_to_settdefcap.py: FAIL
LogicalDisk - 03_ld_gi_errs.py: FAIL
Memory - 01_memory.py: FAIL
ResourceAllocationFromPool - 05_RAPF_err.py: FAIL
SettingsDefine - 02_reverse.py: FAIL
VSSD - 04_vssd_to_rasd.py: FAIL
VirtualSystemManagementService - 02_destroysystem.py: FAIL
VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL
Please find the complete report attached with the mail.
Thanks and Regards,
Deepti.
Starting test suite: libvirt-cim
Cleaned log files.
Testing XenFV hypervisor
AllocationCapabilities - 01_enum.py: PASS
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
ComputerSystem - 01_enum.py: PASS
ComputerSystem - 02_nosystems.py: PASS
ComputerSystem - 03_defineVS.py: PASS
ComputerSystem - 04_defineStartVS.py: FAIL
ERROR - Error: property values are not set for VS domguest
ComputerSystem - 05_activate_defined_start.py: XFAIL Bug: 85769
ERROR - ERROR: VS DomST1 transition from Defined State to Activate state was not Successful
Bug:<85769>
ComputerSystem - 06_paused_active_suspend.py: FAIL
ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain not running')
ERROR - Unable to suspend dom DomST1 using RequestedStateChange()
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running
ComputerSystem - 22_define_suspend.py: PASS
ComputerSystem - 23_suspend_suspend.py: FAIL
ERROR - RequestedState should be 2 not 12
ERROR - Attributes for dom test_domain not set as expected.
ComputerSystem - 27_define_suspend_errs.py: PASS
ComputerSystem - 32_start_reboot.py: FAIL
ERROR - RequestedState should be 2 not 12
ERROR - Attributes for dom test_domain not set as expected.
ComputerSystem - 33_suspend_reboot.py: FAIL
ERROR - RequestedState should be 2 not 12
ERROR - Attributes for dom test_domain not set as expected.
ComputerSystem - 35_start_reset.py: FAIL
ERROR - RequestedState should be 2 not 12
ERROR - Attributes for dom test_domain not set as expected.
ComputerSystem - 40_RSC_start.py: PASS
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystem - 42_cs_gi_errs.py: PASS
ComputerSystemIndication - 01_created_indication.py: PASS
ElementAllocatedFromPool - 01_forward.py: SKIP
ElementAllocatedFromPool - 02_reverse.py: SKIP
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
ElementAllocatedFromPool - 04_forward_errs.py: FAIL
ERROR - Unexpected rc code 6 and description CIM_ERR_NOT_FOUND: No such instance (hd_domain/hda)
ERROR - ------FAILED: Invalid SystemName KeyName.------
ElementCapabilities - 01_forward.py: FAIL
ERROR - ElementCapabilities association classname error
ElementCapabilities - 02_reverse.py: PASS
ElementCapabilities - 03_forward_errs.py: PASS
ElementCapabilities - 04_reverse_errs.py: PASS
ElementCapabilities - 05_hostsystem_cap.py: PASS
ElementConforms - 01_forward.py: FAIL
ERROR - Failed to get associators information for ElementConformsToProfile
ERROR - Exception: not enough arguments for format string
ElementConforms - 02_reverse.py: PASS
ElementConforms - 03_ectp_fwd_errs.py: PASS
ElementConforms - 04_ectp_rev_errs.py: PASS
ElementSettingData - 01_forward.py: SKIP
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: SKIP
EnabledLogicalElementCapabilities - 01_enum.py: FAIL
ERROR - Get domain list error, the number of domains is not equal
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
HostSystem - 01_enum.py: PASS
HostSystem - 02_hostsystem_to_rasd.py: PASS
HostSystem - 03_hs_to_settdefcap.py: FAIL
ERROR - Error checking RASD attribute values 'propertypolicy'
ERROR - SystemExit : 1
HostSystem - 04_hs_to_EAPF.py: SKIP
HostSystem - 05_hs_gi_errs.py: PASS
HostSystem - 06_hs_to_vsms.py: PASS
HostedDependency - 01_forward.py: SKIP
HostedDependency - 02_reverse.py: SKIP
HostedDependency - 03_enabledstate.py: SKIP
HostedDependency - 04_reverse_errs.py: SKIP
HostedResourcePool - 01_forward.py: PASS
HostedResourcePool - 02_reverse.py: PASS
HostedResourcePool - 03_forward_errs.py: PASS
HostedResourcePool - 04_reverse_errs.py: PASS
HostedService - 01_forward.py: PASS
HostedService - 02_reverse.py: PASS
HostedService - 03_forward_errs.py: PASS
HostedService - 04_reverse_errs.py: PASS
LogicalDisk - 01_disk.py: PASS
LogicalDisk - 02_nodevs.py: PASS
LogicalDisk - 03_ld_gi_errs.py: FAIL
ERROR - Failed to get instance by the class of Xen_LogicalDisk
ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/hda)')
Memory - 01_memory.py: FAIL
ERROR - Capacity should be 256 MB instead of 131072 MB
Memory - 02_defgetmem.py: PASS
Memory - 03_mem_gi_errs.py: PASS
NetworkPort - 01_netport.py: XFAIL Bug: 90844
ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)')
Bug:<90844>
NetworkPort - 02_np_gi_errors.py: PASS
NetworkPort - 03_user_netport.py: SKIP
Processor - 01_processor.py: PASS
Processor - 02_definesys_get_procs.py: PASS
Processor - 03_proc_gi_errs.py: PASS
Profile - 01_enum.py: SKIP
Profile - 02_profile_to_elec.py: SKIP
Profile - 03_rprofile_gi_errs.py: SKIP
RASD - 01_verify_rasd_fields.py: PASS
RASD - 02_enum.py: PASS
RASD - 03_rasd_errs.py: PASS
ReferencedProfile - 01_verify_refprof.py: PASS
ReferencedProfile - 02_refprofile_errs.py: PASS
ResourceAllocationFromPool - 01_forward.py: PASS
ResourceAllocationFromPool - 02_reverse.py: PASS
ResourceAllocationFromPool - 03_forward_errs.py: PASS
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
ResourceAllocationFromPool - 05_RAPF_err.py: FAIL
ERROR - Xen_NetResourceAllocationSettingData returned 0 instances, excepted atleast 1 instance
ERROR - ------FAILED: to verify the RAFP.------
ResourcePool - 01_enum.py: SKIP
ResourcePool - 02_rp_gi_errors.py: SKIP
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
ResourcePoolConfigurationService - 01_enum.py: PASS
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: XFAIL Bug: 92173
ERROR - Unexpected rc code 1 and description CIM_ERR_FAILED: Unknown Method
InvokeMethod(AddResourcesToResourcePool): CIM_ERR_FAILED: Unknown Method
Bug:<92173>
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
SettingsDefine - 01_forward.py: PASS
SettingsDefine - 02_reverse.py: FAIL
ERROR - Mistmatching value for VSSDComponent association
CIM_ERR_NOT_FOUND: No such instance (virtgst/proc)
SettingsDefine - 03_sds_fwd_errs.py: PASS
SettingsDefine - 04_sds_rev_errs.py: PASS
SettingsDefineCapabilities - 01_forward.py: PASS
SettingsDefineCapabilities - 03_forward_errs.py: PASS
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
SystemDevice - 01_forward.py: PASS
SystemDevice - 02_reverse.py: PASS
SystemDevice - 03_fwderrs.py: PASS
VSSD - 01_enum.py: PASS
VSSD - 02_bootldr.py: SKIP
VSSD - 03_vssd_gi_errs.py: PASS
VSSD - 04_vssd_to_rasd.py: FAIL
ERROR - Xen_VirtualSystemSettingData with VSSDC_dom was not returned
ERROR - Xen_VirtualSystemSettingData returned 0 VSSD objects, expected only 1
VirtualSystemManagementCapabilities - 01_enum.py: PASS
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
VirtualSystemManagementService - 01_definesystem_name.py: PASS
VirtualSystemManagementService - 02_destroysystem.py: FAIL
ERROR - Unknow exception happened
ERROR - (1, u'CIM_ERR_FAILED: Unable to retrieve domain name.')
ERROR - Destroyed multiple domains
InvokeMethod(DestroySystem): CIM_ERR_FAILED: Unable to retrieve domain name.
error line 1: syntax error in 'wrong'
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
error line 1: syntax error in 'wrong'
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL
ERROR - destroy_fail>>noname: Error executing DestroySystem, exception details below
ERROR - (1, u'CIM_ERR_FAILED: Unable to retrieve domain name.')
ERROR - destroy_fail>>nonexistent: Error executing DestroySystem, exception details below
ERROR - (1, u'CIM_ERR_FAILED: Failed to find domain')
InvokeMethod(DestroySystem): CIM_ERR_FAILED: Unable to retrieve domain name.
InvokeMethod(DestroySystem): CIM_ERR_FAILED: Failed to find domain
VirtualSystemManagementService - 06_addresource.py: SKIP
error line 1: syntax error in 'ever'
VirtualSystemManagementService - 07_addresource_neg.py: PASS
VirtualSystemManagementService - 08_modifyresource.py: XFAIL Bug: 90853
ERROR - Error invoking ModifyRS
ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'")
InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain'
Bug:<90853>
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationSettingData - 01_enum.py: PASS
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
VirtualSystemSettingDataComponent - 01_forward.py: SKIP
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
VirtualSystemSnapshotService - 01_enum.py: PASS
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS
16 years, 7 months
[PATCH] [TEST] #2 Resubmit PoolXML class for creating a virtual pool in vxml.py
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1210852307 25200
# Node ID a8dbad0a9854623167932386e4bae8a737b46672
# Parent 06c87ac466e374f7ca5b7e3dd1923ee32f1ef2ce
[TEST] #2 Resubmit PoolXML class for creating a virtual pool in vxml.py.
Removed source tag and add pool destroy function.
Added the pool-destroy to the file_arg_cmds list.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 06c87ac466e3 -r a8dbad0a9854 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue May 13 06:07:27 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu May 15 04:51:47 2008 -0700
@@ -37,6 +37,9 @@ default_bridge_name = 'testbridge'
default_bridge_name = 'testbridge'
default_network_name = 'default-net'
+#vxml.PoolXML
+default_pool_name = 'testpool'
+
# vxml.VirtXML
default_domname = 'domU1'
default_memory = 128
diff -r 06c87ac466e3 -r a8dbad0a9854 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue May 13 06:07:27 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu May 15 04:51:47 2008 -0700
@@ -143,12 +143,14 @@ class Virsh:
self.vuri = 'qemu:///system'
def run(self, ip, vcmd, param):
- file_arg_cmds = ['define', 'create', 'net-create']
+ file_arg_cmds = ['define', 'create', 'net-create', 'pool-create', 'pool-destroy']
if vcmd in file_arg_cmds:
ntf = tempfile.NamedTemporaryFile('w')
ntf.write(param)
ntf.flush()
name = ntf.name
+ elif vcmd == 'pool-destroy':
+ name = param
elif param is None:
name = ""
else:
@@ -211,6 +213,28 @@ class NetXML(Virsh, XMLClass):
def create_vnet(self):
return self.run(self.server, 'net-create', self.xml_string)
+class PoolXML(Virsh, XMLClass):
+
+ def __init__(self, server, poolname=const.default_pool_name,
+ virt='xen'):
+
+ XMLClass.__init__(self)
+ if virt == 'XenFV':
+ virt = 'xen'
+ Virsh.__init__(self, str(virt).lower())
+ self.pool_name = poolname
+ self.server = server
+
+ pool = self.add_sub_node(self.xdoc, 'pool', type='dir')
+ self.add_sub_node(pool, 'name', self.pool_name)
+ target = self.add_sub_node(pool, 'target')
+ self.add_sub_node(target, 'path', '/tmp')
+
+ def create_vpool(self):
+ return self.run(self.server, 'pool-create', self.xml_string)
+
+ def destroy_vpool(self):
+ return self.run(self.server, 'pool-destroy', self.pool_name)
class VirtXML(Virsh, XMLClass):
"""Base class for all XML generation & operation"""
16 years, 7 months
[PATCH] [TEST] #2 Updating 01_forward.py of SDC
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)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(a)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:
16 years, 7 months
[PATCH] [TEST] Adding create_diskpool() function
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1210765549 25200
# Node ID 6671b339cc8fd7c2cc7cada2ac15bc93635fbe4b
# Parent 63c2d5e576bd750c0ba0975424a72ac24105c6f7
[TEST] Adding create_diskpool() function.
Modified vxml to get the poolname and networkname .
To create the storage pool on machine with libvirt >= 0.4.1
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 63c2d5e576bd -r 6671b339cc8f suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed May 14 04:36:40 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed May 14 04:45:49 2008 -0700
@@ -1,3 +1,4 @@
+#!/usr/bin/python
#
# Copyright 2008 IBM Corp.
#
@@ -33,6 +34,8 @@ from CimTest.Globals import logger, log_
from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
from XenKvmLib.const import CIM_REV
+from VirtLib.live import diskpool_list, virsh_version, net_list
+from XenKvmLib.vxml import PoolXML, NetXML
test_dpath = "foo"
diskpoolconf_rev = 558
@@ -294,3 +297,53 @@ def create_diskpool_file():
return conf_file()
+def create_diskpool(server, virt='KVM'):
+ status = PASS
+ try:
+ dpool_list = diskpool_list(server, virt='KVM')
+ if len(dpool_list) > 0:
+ dpoolname=dpool_list[0]
+ else:
+ diskxml = PoolXML(server, virt=virt)
+ ret = diskxml.create_vpool()
+ if not ret:
+ logger.error('Failed to create the disk pool "%s"',
+ dpoolname)
+ status = FAIL
+ dpoolname=diskxml.xml_get_diskpool_name()
+ except Exception, detail:
+ logger.error("Exception: In fn create_diskpool(): %s", detail)
+ status=FAIL
+ return status, dpoolname
+
+def create_diskpool_conf(server, virt):
+ libvirt_version = virsh_version(server, virt)
+ if virt == 'KVM' and libvirt_version >= '0.4.1' and \
+ CIM_REV > diskpoolconf_rev:
+ status, dpoolname = create_diskpool(server, virt=virt)
+ diskid = "%s/%s" % ("DiskPool", dpoolname)
+ else:
+ status = create_diskpool_file()
+ diskid = "%s/%s" % ("DiskPool", test_dpath)
+
+ return status, diskid
+
+
+def create_netpool_conf(server, virt):
+ status = PASS
+ try:
+ vir_network = net_list(server, virt)
+ if len(vir_network) > 0:
+ test_network = vir_network[0]
+ else:
+ netxml = NetXML(server, virt=virt)
+ ret = netxml.create_vnet()
+ if not ret:
+ logger.error("Failed to create Virtual Network '%s'",
+ test_network)
+ status = FAIL
+ test_network = netxml.xml_get_netpool_name()
+ except Exception, detail:
+ logger.error("Exception: In fn create_netpool_conf(): %s", detail)
+ status=FAIL
+ return status, test_network
diff -r 63c2d5e576bd -r 6671b339cc8f suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed May 14 04:36:40 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed May 14 04:45:49 2008 -0700
@@ -121,7 +121,6 @@ class XMLClass:
except Exception:
logger.info('Zero or multiple node found')
return None
-
if node.nodeType == Node.ATTRIBUTE_NODE:
return node.value
if node.nodeType == Node.TEXT_NODE:
@@ -213,10 +212,14 @@ class NetXML(Virsh, XMLClass):
def create_vnet(self):
return self.run(self.server, 'net-create', self.xml_string)
+ def xml_get_netpool_name(self):
+ npoolname = self.get_value_xpath('/network/name')
+ return npoolname
+
class PoolXML(Virsh, XMLClass):
def __init__(self, server, poolname=const.default_pool_name,
- virt='xen'):
+ virt='xen'):
XMLClass.__init__(self)
if virt == 'XenFV':
@@ -235,6 +238,10 @@ class PoolXML(Virsh, XMLClass):
def destroy_vpool(self):
return self.run(self.server, 'pool-destroy', self.pool_name)
+
+ def xml_get_diskpool_name(self):
+ dpoolname = self.get_value_xpath('/pool/name')
+ return dpoolname
class VirtXML(Virsh, XMLClass):
"""Base class for all XML generation & operation"""
@@ -293,7 +300,7 @@ class VirtXML(Virsh, XMLClass):
def set_diskdev(self, diskdev):
self.set_attributes('/domain/devices/disk/target', dev=diskdev)
-
+
def define(self, ip):
return self.run(ip, 'define', self.xml_string)
@@ -374,7 +381,8 @@ class VirtXML(Virsh, XMLClass):
bridgeStr = self.get_value_xpath(
'/domain/devices/interface/source/@bridge')
return bridgeStr
-
+
+
def dumpxml(self, ip):
cmd = 'virsh -c %s dumpxml %s' % (self.vuri, self.dname)
s, o = utils.run_remote(ip, cmd)
16 years, 7 months
[PATCH] [TEST] Resubmit PoolXML class for creating a virtual pool in vxml.py
by Guo Lian Yun
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1210730487 25200
# Node ID 82e90471b04874cb48a473dd72468be6f784acba
# Parent 06c87ac466e374f7ca5b7e3dd1923ee32f1ef2ce
[TEST] Resubmit PoolXML class for creating a virtual pool in vxml.py
Removed source tag and add pool destroy function
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 06c87ac466e3 -r 82e90471b048 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue May 13 06:07:27 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Tue May 13 19:01:27 2008 -0700
@@ -37,6 +37,9 @@ default_bridge_name = 'testbridge'
default_bridge_name = 'testbridge'
default_network_name = 'default-net'
+#vxml.PoolXML
+default_pool_name = 'testpool'
+
# vxml.VirtXML
default_domname = 'domU1'
default_memory = 128
diff -r 06c87ac466e3 -r 82e90471b048 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue May 13 06:07:27 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue May 13 19:01:27 2008 -0700
@@ -143,12 +143,14 @@ class Virsh:
self.vuri = 'qemu:///system'
def run(self, ip, vcmd, param):
- file_arg_cmds = ['define', 'create', 'net-create']
+ file_arg_cmds = ['define', 'create', 'net-create', 'pool-create']
if vcmd in file_arg_cmds:
ntf = tempfile.NamedTemporaryFile('w')
ntf.write(param)
ntf.flush()
name = ntf.name
+ elif vcmd == 'pool-destroy':
+ name = param
elif param is None:
name = ""
else:
@@ -211,6 +213,28 @@ class NetXML(Virsh, XMLClass):
def create_vnet(self):
return self.run(self.server, 'net-create', self.xml_string)
+class PoolXML(Virsh, XMLClass):
+
+ def __init__(self, server, poolname=const.default_pool_name,
+ virt='xen'):
+
+ XMLClass.__init__(self)
+ if virt == 'XenFV':
+ virt = 'xen'
+ Virsh.__init__(self, str(virt).lower())
+ self.pool_name = poolname
+ self.server = server
+
+ pool = self.add_sub_node(self.xdoc, 'pool', type='dir')
+ self.add_sub_node(pool, 'name', self.pool_name)
+ target = self.add_sub_node(pool, 'target')
+ self.add_sub_node(target, 'path', '/tmp')
+
+ def create_vpool(self):
+ return self.run(self.server, 'pool-create', self.xml_string)
+
+ def destroy_vpool(self):
+ return self.run(self.server, 'pool-destroy', self.pool_name)
class VirtXML(Virsh, XMLClass):
"""Base class for all XML generation & operation"""
16 years, 7 months