[PATCH] [TEST] Fix CIM_REV to handle non integer strings
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1212165521 25200
# Node ID 7e4310cd6913605148b038b46d244ed670730727
# Parent 4a5a44d7b857df543af24d59380cb8fdbbb753a4
[TEST] Fix CIM_REV to handle non integer strings.
When working with patches, the changeset revision has a + appended to it.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 4a5a44d7b857 -r 7e4310cd6913 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri May 30 14:26:38 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Fri May 30 09:38:41 2008 -0700
@@ -26,7 +26,11 @@
global CIM_REV
global CIM_SET
-CIM_REV = int(os.getenv("CIM_REV"))
+rev = os.getenv("CIM_REV").strip("+")
+if rev.isalnum():
+ CIM_REV = int(rev)
+else:
+ CIM_REV = 0
CIM_SET = os.getenv("CIM_SET")
if not CIM_REV or not CIM_SET:
16 years, 11 months
[PATCH] [TEST] #3 LXC support using DefineSystem & VSMS.01
by zli@linux.vnet.ibm.com
# HG changeset patch
# User Zhengang Li <lizg(a)cn.ibm.com>
# Date 1212545171 -28800
# Node ID 277b821188f247baaa02f0668915a57f9e8c83b1
# Parent 5c77329cb53e6340cd6ddbf9c044462fb994eb88
[TEST] #3 LXC support using DefineSystem & VSMS.01
Updates:
.2# add the missing address property
.3#
- Skip network and processor device
- Use different values for mountpoint and source
Signed-off-by: Zhengang Li <lizg(a)cn.ibm.com>
diff -r 5c77329cb53e -r 277b821188f2 suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Fri May 30 14:26:38 2008 +0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Wed Jun 04 10:06:11 2008 +0800
@@ -30,7 +30,7 @@
from CimTest.Globals import do_main
from CimTest.Globals import logger
-SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV']
+SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC']
default_dom = 'test_domain'
@do_main(SUPPORTED_TYPES)
diff -r 5c77329cb53e -r 277b821188f2 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri May 30 14:26:38 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Jun 04 10:06:11 2008 +0800
@@ -85,3 +85,5 @@
#vxml.LXCXML
LXC_init_path = os.path.join(_image_dir, 'cimtest_lxc_init')
LXC_default_tty = '/dev/ptmx'
+LXC_default_mp = '/tmp'
+LXC_default_source = '/tmp/lxc_files'
diff -r 5c77329cb53e -r 277b821188f2 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri May 30 14:26:38 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Jun 04 10:06:11 2008 +0800
@@ -102,6 +102,8 @@
self.isFullVirt = (type == 'KVM' or virt == 'XenFV')
if self.isFullVirt:
self.BootDevice = 'hd'
+ elif type == 'LXC':
+ self.InitPath = const.LXC_init_path
else:
self.Bootloader = live.bootloader(Globals.CIM_IP, 0)
self.BootloaderArgs = ''
@@ -113,6 +115,9 @@
pass
class KVM_VirtualSystemSettingData(CIM_VirtualSystemSettingData):
+ pass
+
+class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData):
pass
@eval_cls('VirtualSystemSettingData')
@@ -134,6 +139,12 @@
class KVM_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData):
pass
+
+class LXC_DiskResourceAllocationSettingData(CIMClassMOF):
+ def __init__(self, mountpoint, source, name):
+ self.MountPoint = mountpoint
+ self.Address = source
+ self.InstanceID = '%s/%s' % (name, mountpoint)
@eval_cls('DiskResourceAllocationSettingData')
def get_dasd_class(virt):
@@ -157,6 +168,9 @@
class KVM_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData):
pass
+class LXC_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData):
+ pass
+
@eval_cls('NetResourceAllocationSettingData')
def get_nasd_class(virt):
pass
@@ -175,6 +189,9 @@
pass
class KVM_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData):
+ pass
+
+class LXC_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData):
pass
@eval_cls('ProcResourceAllocationSettingData')
@@ -197,6 +214,9 @@
class KVM_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData):
pass
+class LXC_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData):
+ pass
+
@eval_cls('MemResourceAllocationSettingData')
def get_masd_class(virt):
pass
@@ -212,17 +232,32 @@
class_vssd = get_vssd_class(virt)
vssd = class_vssd(name=dom_name, virt=virt)
- class_dasd = get_dasd_class(virt)
- if virt == 'KVM':
- disk_dev = 'hda'
- disk_source = const.KVM_disk_path
- elif virt == 'XenFV':
- disk_dev = 'hda'
- disk_source = const.XenFV_disk_path
- d = class_dasd(
- dev=disk_dev,
- source=disk_source,
+ # LXC only takes disk and memory device for now.
+ # Only disk __init__ takes different params.
+ if virt == 'LXC':
+ d = LXC_DiskResourceAllocationSettingData(
+ mountpoint=const.LXC_default_mp,
+ source=const.LXC_default_source, name=dom_name)
+ else:
+ class_dasd = get_dasd_class(virt)
+ if virt == 'KVM':
+ disk_dev = 'hda'
+ disk_source = const.KVM_disk_path
+ elif virt == 'XenFV':
+ disk_dev = 'hda'
+ disk_source = const.XenFV_disk_path
+ d = class_dasd(
+ dev=disk_dev,
+ source=disk_source,
+ name=dom_name)
+
+ class_masd = get_masd_class(virt)
+ m = class_masd(
+ megabytes=mem_mb,
name=dom_name)
+ if virt == 'LXC':
+ return vssd.mof(), [d.mof(), m.mof()]
+
class_nasd = get_nasd_class(virt)
if virt == 'KVM':
net_mac= const.KVM_default_mac
@@ -236,10 +271,6 @@
p = class_pasd(
vcpu=proc_vcpu,
name=dom_name)
- class_masd = get_masd_class(virt)
- m = class_masd(
- megabytes=mem_mb,
- name=dom_name)
return vssd.mof(), [d.mof(), n.mof(), p.mof(), m.mof()]
16 years, 11 months
CimTest Report for KVM on F9 04-06-2008
by Deepti B Kalakeri
========================================================================
CIM Test Report for KVM on F9 with latest libvirt-cim and libcmpiutil
========================================================================
Distro : Fedora 9 Beta
Kernel : 2.6.25-0.121.rc5.git4.fc9
Libvirt : libvirt-0.4.2-1.fc9.x86_64
CIMOM : pegasus
PyWBEM : pywbem-0.6
CIM Schema : cimv216Experimental
LibCMPIutil : 79
LibVirtCIM : 599
CIMTEST : 175
=======================================================
PASS : 101
FAIL : 8
XFAIL : 2
SKIP : 18
-----------------
Total : 129
=======================================================
List of tc that are failing
HostSystem - 02_hostsystem_to_rasd.py: FAIL
RASD - 01_verify_rasd_fields.py: FAIL
ResourceAllocationFromPool - 05_RAPF_err.py: FAIL
All the above fail because of the KVMXML changes.
NetworkPort - 03_user_netport.py: FAIL
VSSD - 03_vssd_gi_errs.py: FAIL
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL
VirtualSystemManagementService - 06_addresource.py: FAIL
VirtualSystemManagementService - 08_modifyresource.py: FAIL
Please find the complete report attached with the mail.
Thanks and Regards,
Deepti.
Starting test suite: libvirt-cim
Cleaned log files.
Testing KVM hypervisor
AllocationCapabilities - 01_enum.py: PASS
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
ComputerSystem - 01_enum.py: PASS
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
ComputerSystem - 03_defineVS.py: PASS
ComputerSystem - 04_defineStartVS.py: PASS
ComputerSystem - 05_activate_defined_start.py: XFAIL Bug: 00002
ERROR - ERROR: VS DomST1 transition from Defined State to Activate state was not Successful
Bug:<00002>
ComputerSystem - 06_paused_active_suspend.py: XFAIL Bug: 00002
ERROR - ERROR: VS DomST1 transition from suspend State to Activate state was not Successful
Bug:<00002>
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: PASS
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
libvir: QEMU error : Domain not found
libvir: Domain error : invalid domain pointer in virDomainFree
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: PASS
ElementCapabilities - 01_forward.py: PASS
ElementCapabilities - 02_reverse.py: PASS
libvir: QEMU error : Domain not found
libvir: Domain error : invalid domain pointer in virDomainFree
ElementCapabilities - 03_forward_errs.py: PASS
libvir: QEMU error : Domain not found
ElementCapabilities - 04_reverse_errs.py: PASS
ElementCapabilities - 05_hostsystem_cap.py: PASS
ElementConforms - 01_forward.py: PASS
ElementConforms - 02_reverse.py: PASS
ElementConforms - 03_ectp_fwd_errs.py: PASS
libvir: QEMU error : Domain not found
libvir: Domain error : invalid domain pointer in virDomainFree
ElementConforms - 04_ectp_rev_errs.py: PASS
ElementSettingData - 01_forward.py: PASS
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
EnabledLogicalElementCapabilities - 01_enum.py: PASS
libvir: QEMU error : Domain not found
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
HostSystem - 01_enum.py: PASS
HostSystem - 02_hostsystem_to_rasd.py: FAIL
ERROR - NetworkType Mismatch
ERROR - Returned network instead of bridge or ethernet
ERROR - Mistmatching association values
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: SKIP
ERROR - System has defined domains; unable to run
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
ERROR - user is not a valid network type
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: FAIL
ERROR - NetworkType Mismatch
ERROR - Returned network instead of bridge or ethernet
ERROR - Mistmatching association values
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 - LookupError : Zero or multiple nodes found for XPath/domain/devices/interface/source
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: PASS
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
SettingsDefine - 01_forward.py: PASS
SettingsDefine - 02_reverse.py: PASS
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 - 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
libvir: Domain error : invalid domain pointer in virDomainFree
libvir: QEMU error : Domain not found
libvir: Domain error : invalid domain pointer in virDomainFree
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
VirtualSystemManagementService - 06_addresource.py: FAIL
ERROR - Error invoking AddRS
ERROR - Error adding rs for proc_vcpu
VirtualSystemManagementService - 07_addresource_neg.py: PASS
VirtualSystemManagementService - 08_modifyresource.py: FAIL
ERROR - Error invoking ModifyRS
ERROR - Error changing rs for net mac
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
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, 11 months
[PATCH] [TEST] Update VSSD.01 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212571822 -28800
# Node ID 4a07684ca9eafeac67dfe6ad7cc01a438a890a37
# Parent 9b2e8889d7937c66e73968e53ec31bf93f535224
[TEST] Update VSSD.01 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 9b2e8889d793 -r 4a07684ca9ea suites/libvirt-cim/cimtest/VSSD/01_enum.py
--- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Wed Jun 04 17:30:22 2008 +0800
@@ -33,6 +33,8 @@
from XenKvmLib.vxml import get_class
from CimTest.Globals import do_main, platform_sup, logger
from CimTest.ReturnCodes import PASS, FAIL
+
+platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "VSSD_dom"
16 years, 11 months
[PATCH] [TEST] Update ResourcePoolConfigurationService.01&02 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212568826 -28800
# Node ID bafe19dae50b5b43f234d808a787a5ba0db463e9
# Parent 9b2e8889d7937c66e73968e53ec31bf93f535224
[TEST] Update ResourcePoolConfigurationService.01&02 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 9b2e8889d793 -r bafe19dae50b suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Wed Jun 04 16:40:26 2008 +0800
@@ -30,6 +30,8 @@
from CimTest.Globals import logger
from CimTest.Globals import do_main, platform_sup
from XenKvmLib.classes import get_typed_class
+
+platform_sup = ['Xen', 'XenFV', 'LXC', 'KVM']
@do_main(platform_sup)
def main():
diff -r 9b2e8889d793 -r bafe19dae50b suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/02_rcps_gi_errors.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/02_rcps_gi_errors.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/02_rcps_gi_errors.py Wed Jun 04 16:40:26 2008 +0800
@@ -34,7 +34,7 @@
from CimTest.Globals import do_main, platform_sup
from XenKvmLib.classes import get_typed_class
-
+platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC']
expr_values = {
"invalid_sysname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
'desc' : 'No such instance (SystemName)' }, \
16 years, 11 months
[PATCH] [TEST] Update RASD.01&03 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212567414 -28800
# Node ID 7ca197434dfef26fd9cca7b3551c85a2178a2071
# Parent 9b2e8889d7937c66e73968e53ec31bf93f535224
[TEST] Update RASD.01&03 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 9b2e8889d793 -r 7ca197434dfe suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py
--- a/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Wed Jun 04 16:16:54 2008 +0800
@@ -58,7 +58,7 @@
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "VSSDC_dom"
test_vcpus = 1
@@ -102,9 +102,14 @@
def assoc_values(assoc_info, xml, disk, virt="Xen"):
procrasd, netrasd, diskrasd, memrasd = init_list(xml, disk, virt)
- proc_status = 1
+ if virt == 'LXC':
+ proc_status = 0
+ disk_status = 0
+ else:
+ proc_status = 1
+ disk_status = 1
+
net_status = 0
- disk_status = 1
mem_status = 1
status = 0
try:
@@ -140,8 +145,11 @@
test_disk = 'hda'
virt_xml = vxml.get_class(options.virt)
- cxml = virt_xml(test_dom, mem=test_mem, vcpus = test_vcpus,
- mac = test_mac, disk = test_disk)
+ if options.virt == 'LXC':
+ cxml = virt_xml(test_dom)
+ else:
+ cxml = virt_xml(test_dom, mem=test_mem, vcpus = test_vcpus,
+ mac = test_mac, disk = test_disk)
ret = cxml.create(options.ip)
if not ret:
logger.error('Unable to create domain %s' % test_dom)
diff -r 9b2e8889d793 -r 7ca197434dfe suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py
--- a/suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py Wed Jun 04 16:16:54 2008 +0800
@@ -63,7 +63,7 @@
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, CIM_ERROR_GETINSTANCE
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "VSSDC_dom"
test_vcpus = 1
@@ -81,7 +81,7 @@
}
}
-def init_list():
+def init_list(virt="Xen"):
disk = {
'cn' : get_typed_class(virt, "DiskResourceAllocationSettingData"), \
'instid' : '%s/%s' %(test_dom, test_disk)
@@ -99,8 +99,11 @@
'cn' : get_typed_class(virt, "NetResourceAllocationSettingData"), \
'instid' : '%s/%s' %(test_dom,test_mac)
}
-
- rasd_values_list =[ disk, mem, proc, net ]
+
+ if virt == 'LXC':
+ rasd_values_list =[ mem ]
+ else:
+ rasd_values_list =[ disk, mem, proc, net ]
return rasd_values_list
def verify_rasd_err(field, keys, rasd_type):
@@ -130,14 +133,16 @@
test_disk = "xvda"
else:
test_disk = "hda"
-
- vsxml = get_class(virt)(test_dom, \
- mem=test_mem, \
- vcpus = test_vcpus, \
- mac = test_mac, \
- disk = test_disk)
+ if options.virt == 'LXC':
+ vsxml = get_class(virt)(test_dom)
+ else:
+ vsxml = get_class(virt)(test_dom, \
+ mem=test_mem, \
+ vcpus = test_vcpus, \
+ mac = test_mac, \
+ disk = test_disk)
+ bridge = vsxml.set_vbridge(server)
try:
- bridge = vsxml.set_vbridge(server)
ret = vsxml.define(options.ip)
if not ret:
logger.error("Failed to Define the domain: %s", test_dom)
16 years, 11 months
[PATCH] [TEST] Update ElementCapabilities.01~04 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212559730 -28800
# Node ID 88f9482289b7035eeb03fcdeb8b9531709cc4fa7
# Parent 9b2e8889d7937c66e73968e53ec31bf93f535224
[TEST] Update ElementCapabilities.01~04 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 9b2e8889d793 -r 88f9482289b7 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Jun 04 14:08:50 2008 +0800
@@ -33,7 +33,7 @@
from XenKvmLib.const import CIM_REV
from XenKvmLib.enumclass import enumerate
-sup_types = ['Xen', 'XenFV', 'KVM']
+sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
ac_to_pool_version = 561
def append_to_list(server, virt, poolname, valid_elc_id):
diff -r 9b2e8889d793 -r 88f9482289b7 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Jun 04 14:08:50 2008 +0800
@@ -32,7 +32,7 @@
from CimTest.Globals import do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP
-sup_types = ['Xen', 'XenFV', 'KVM']
+sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
def call_assoc(ip, cn, id, virt="Xen"):
status = PASS
diff -r 9b2e8889d793 -r 88f9482289b7 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Wed Jun 04 14:08:50 2008 +0800
@@ -30,7 +30,7 @@
from CimTest.Globals import logger, do_main
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'XenFV', 'KVM']
+sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
exp_rc = 6 #CIM_ERR_NOT_FOUND
exp_desc = "No such instance"
diff -r 9b2e8889d793 -r 88f9482289b7 suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Wed Jun 04 14:08:50 2008 +0800
@@ -29,7 +29,7 @@
from CimTest.Globals import logger, do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP
-sup_types = ['Xen', 'XenFV', 'KVM']
+sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
exp_rc = 6 #CIM_ERR_NOT_FOUND
exp_desc = "No such instance"
16 years, 11 months
[PATCH] [TEST] Update SettingsDefine.01~04 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212556756 -28800
# Node ID 9d471559a53aee2058545de88471c0288c14af46
# Parent 9b2e8889d7937c66e73968e53ec31bf93f535224
[TEST] Update SettingsDefine.01~04 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 9b2e8889d793 -r 9d471559a53a suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Wed Jun 04 13:19:16 2008 +0800
@@ -37,7 +37,7 @@
from CimTest.Globals import do_main
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "domu1"
test_mac = "00:11:22:33:44:aa"
@@ -71,19 +71,23 @@
else:
test_disk = 'hda'
virt_xml = vxml.get_class(options.virt)
- cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac,
- disk = test_disk)
+ if options.virt == 'LXC':
+ cxml = virt_xml(test_dom)
+ cn_id = {'Memory' : 'mem'}
+ else:
+ cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac,
+ disk = test_disk)
+ cn_id = {
+ 'LogicalDisk' : test_disk,
+ 'Memory' : 'mem',
+ 'NetworkPort' : test_mac,
+ 'Processor' : test_vcpus -1 }
+
ret = cxml.create(options.ip)
if not ret:
Globals.logger.error("Failed to Create the dom: %s", test_dom)
return FAIL
-
- cn_id = {
- 'LogicalDisk' : test_disk,
- 'Memory' : 'mem',
- 'NetworkPort' : test_mac,
- 'Processor' : test_vcpus -1 }
devlist = {}
diff -r 9b2e8889d793 -r 9d471559a53a suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Wed Jun 04 13:19:16 2008 +0800
@@ -62,7 +62,7 @@
from XenKvmLib.const import CIM_REV
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "virtgst"
test_vcpus = 1
@@ -166,8 +166,11 @@
status = PASS
virt_xml = vxml.get_class(options.virt)
- cxml = virt_xml(test_dom, mem = test_mem, vcpus = test_vcpus,
- mac = test_mac, disk = test_disk)
+ if options.virt == 'LXC':
+ cxml = virt_xml(test_dom)
+ else:
+ cxml = virt_xml(test_dom, mem = test_mem, vcpus = test_vcpus,
+ mac = test_mac, disk = test_disk)
ret = cxml.create(options.ip)
if not ret:
logger.error("Failed to create the dom: %s", test_dom)
diff -r 9b2e8889d793 -r 9d471559a53a suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Wed Jun 04 13:19:16 2008 +0800
@@ -154,7 +154,7 @@
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
from CimTest.Globals import do_main
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "domu1"
test_mac = "00:11:22:33:44:aa"
@@ -215,8 +215,11 @@
test_disk = 'hda'
virt_xml = vxml.get_class(options.virt)
- cxml= virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac,
- disk = test_disk)
+ if options.virt == 'LXC':
+ cxml = virt_xml(test_dom)
+ else:
+ cxml= virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac,
+ disk = test_disk)
ret = cxml.create(options.ip)
if not ret:
@@ -226,13 +229,15 @@
global conn
conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, \
CIM_PASS), CIM_NS)
-
- class_id = {
- get_typed_class(options.virt, 'LogicalDisk') : test_disk,
- get_typed_class(options.virt, 'Memory') : 'mem',
- get_typed_class(options.virt, 'NetworkPort') : test_mac,
- get_typed_class(options.virt, 'Processor') : test_vcpus - 1
- }
+ if options.virt == 'LXC':
+ class_id = {get_typed_class(options.virt, 'Memory') : 'mem'}
+ else:
+ class_id = {
+ get_typed_class(options.virt, 'LogicalDisk') : test_disk,
+ get_typed_class(options.virt, 'Memory') : 'mem',
+ get_typed_class(options.virt, 'NetworkPort') : test_mac,
+ get_typed_class(options.virt, 'Processor') : test_vcpus - 1
+ }
tc_scen = [
'INVALID_DevID_Keyname', 'INVALID_DevID_Keyval', \
diff -r 9b2e8889d793 -r 9d471559a53a suites/libvirt-cim/cimtest/SettingsDefine/04_sds_rev_errs.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/04_sds_rev_errs.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/04_sds_rev_errs.py Wed Jun 04 13:19:16 2008 +0800
@@ -63,7 +63,7 @@
from CimTest.Globals import do_main, logger
from CimTest.Globals import CIM_USER, CIM_PASS, CIM_NS
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "domu1"
test_mac = "00:11:22:33:44:aa"
@@ -104,8 +104,11 @@
test_disk = 'hda'
virt_xml = vxml.get_class(options.virt)
- cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac,
- disk = test_disk)
+ if options.virt == 'LXC':
+ cxml = virt_xml(test_dom)
+ else:
+ cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac,
+ disk = test_disk)
ret = cxml.create(options.ip)
if not ret:
@@ -117,12 +120,19 @@
CIM_PASS), CIM_NS)
rasd_base= 'ResourceAllocationSettingData'
- class_id = {
- get_typed_class(options.virt, 'Disk' + rasd_base) : test_disk,
- get_typed_class(options.virt, 'Mem' + rasd_base) : 'mem',
- get_typed_class(options.virt, 'Net' + rasd_base) : test_mac,
- get_typed_class(options.virt, 'Proc' + rasd_base) : test_vcpus - 1
- }
+ if options.virt == 'LXC':
+ class_id = {
+ get_typed_class(options.virt, 'Disk' + rasd_base) : test_disk,
+ get_typed_class(options.virt, 'Mem' + rasd_base) : 'mem',
+ get_typed_class(options.virt, 'Proc' + rasd_base) : test_vcpus - 1
+ }
+ else:
+ class_id = {
+ get_typed_class(options.virt, 'Disk' + rasd_base) : test_disk,
+ get_typed_class(options.virt, 'Mem' + rasd_base) : 'mem',
+ get_typed_class(options.virt, 'Net' + rasd_base) : test_mac,
+ get_typed_class(options.virt, 'Proc' + rasd_base) : test_vcpus - 1
+ }
tc_scen = ['INVALID_InstID_Keyname', 'INVALID_InstID_Keyval']
16 years, 11 months
[PATCH] [TEST] 2# Update SystemDevice.01~03 for LXC support, ignore the vcpu tag in define a container guest
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212547749 -28800
# Node ID 62a1d45d71d9329f29bd17961f7fdd44256b9bc3
# Parent 9b2e8889d7937c66e73968e53ec31bf93f535224
[TEST] 2# Update SystemDevice.01~03 for LXC support, ignore the vcpu tag in define a container guest
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 9b2e8889d793 -r 62a1d45d71d9 suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Wed Jun 04 10:49:09 2008 +0800
@@ -33,7 +33,7 @@
from CimTest.Globals import logger, do_main
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "test_domain"
test_mac = "00:11:22:33:44:55"
@@ -50,7 +50,10 @@
status = PASS
virt_xml = vxml.get_class(options.virt)
- cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, disk = test_disk)
+ if options.virt == 'LXC':
+ cxml = virt_xml(test_dom)
+ else:
+ cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, disk = test_disk)
ret = cxml.create(options.ip)
if not ret:
logger.error('Unable to create domain %s' % test_dom)
diff -r 9b2e8889d793 -r 62a1d45d71d9 suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Wed Jun 04 10:49:09 2008 +0800
@@ -33,7 +33,7 @@
from CimTest.Globals import logger, do_main
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "test_domain"
test_mac = "00:11:22:33:44:55"
@@ -44,10 +44,14 @@
status = FAIL
virt_xml = vxml.get_class(options.virt)
- cxml = virt_xml(test_dom, mac=test_mac)
+ if options.virt == 'LXC':
+ cxml = virt_xml(test_dom)
+ devlist = ["Memory"]
+ else:
+ cxml = virt_xml(test_dom, mac=test_mac)
+ devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor" ]
cxml.create(options.ip)
- devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor" ]
key_list = ["DeviceID", "CreationClassName", "SystemName",
"SystemCreationClassName"]
diff -r 9b2e8889d793 -r 62a1d45d71d9 suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Tue Jun 03 13:13:39 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Wed Jun 04 10:49:09 2008 +0800
@@ -40,7 +40,7 @@
from CimTest import Globals
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "virt1"
test_mac = "00:11:22:33:44:55"
@@ -64,15 +64,19 @@
status = PASS
virt_xml = vxml.get_class(options.virt)
- cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac,
- disk = test_disk)
+ if options.virt == 'LXC':
+ cxml = virt_xml(test_dom)
+ devlist = ["Memory"]
+ else:
+ cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac,
+ disk = test_disk)
+ devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor" ]
ret = cxml.create(options.ip)
if not ret :
logger.info("error while 'create' of VS")
return FAIL
- devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor" ]
# Building the dict for avoiding the correct key:val pairs
# while verifying with the Invalid values for the association
16 years, 11 months
[TEST] Null of LXC_SettingsDefineState forward query
by Guo Lian Yun
Kaitlin,
Could you get expect result by below query?
wbemcli ain -ac LXC_SettingsDefineState
http://root:password@localhost/root/virt:LXC_Memory.DeviceID="test_domain/mem",CreationClassName="LXC_Memory",SystemName="test_domain",SystemCreationClassName="LXC_ComputerSystem"
But ein and reverse query work for me.
wbemcli ein http://root:password@localhost/root/virt:LXC_Memory
localhost:5988/root/virt:LXC_Memory.DeviceID="test_domain/mem",CreationClassName="LXC_Memory",SystemName="test_domain",SystemCreationClassName="LXC_ComputerSystem"
wbemcli ain -ac LXC_VirtualSystemSettingDataComponent
http://root:password@localhost:5988/root/virt:LXC_VirtualSystemSettingDat..."LXC:test_domain"
localhost:5988/root/virt:LXC_MemResourceAllocationSettingData.InstanceID="test_domain/mem"
Best,
Regards
Daisy (运国莲)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol(a)cn.ibm.com
TEL: (86)-21-60922144
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203
16 years, 11 months