Xen on Pegasus Test Run Summary for Oct 09 2008
by Guo Lian Yun
=================================================
Xen on Pegasus Test Run Summary for Oct 09 2008
=================================================
Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Kernel: 2.6.18-92.el5xen
libvirt: 0.3.3
Hypervisor: Xen 3.1.0
CIMOM: Pegasus 2.7.0
Libvirt-cim revision: 714
Libvirt-cim changeset: f7b995404a9c
=================================================
FAIL : 0
XFAIL : 0
SKIP : 3
PASS : 132
-----------------
Total : 135
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
NetworkPort - 03_user_netport.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_suspend_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_suspend_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: PASS
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: PASS
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
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: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
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
--------------------------------------------------------------------
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: PASS
--------------------------------------------------------------------
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: SKIP
--------------------------------------------------------------------
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: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.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: 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: 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: PASS
--------------------------------------------------------------------
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: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
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, 2 months
[PATCH] [TEST] #7 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223519910 25200
# Node ID 9d21f0fe6973b74e4ac3d776e481be016661192f
# Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5
[TEST] #7 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 285bc0174fb3 -r 9d21f0fe6973 suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Wed Oct 08 03:03:37 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Wed Oct 08 19:38:30 2008 -0700
@@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa
from pywbem.cim_obj import CIMInstanceName
from XenKvmLib import assoc
from XenKvmLib import enumclass
+from XenKvmLib.common_util import get_host_info, try_assoc
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \
CIM_PASS, CIM_NS
@@ -32,56 +33,55 @@ from CimTest.ReturnCodes import PASS, FA
from CimTest.ReturnCodes import PASS, FAIL, XFAIL
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
-exp_rc = 6 #CIM_ERR_NOT_FOUND
-exp_desc = "No such instance"
+exp_values = {
+ "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND,
+ "desc" : "No such instance (CreationClassName)"},
+ "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND,
+ "desc" : "No such instance (Name)"}
+ }
@do_main(sup_types)
def main():
options = main.options
- rc = -1
status = FAIL
keys = ['Name', 'CreationClassName']
- try:
- host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0]
- except Exception:
- logger.error(CIM_ERROR_ENUMERATE % host_sys.name)
+ status, host_name, host_ccn = get_host_info(options.ip, options.virt)
+ if status != PASS:
+ logger.error("Error in calling get_host_info function")
return FAIL
-
- servicelist = {get_typed_class(options.virt, "ResourcePoolConfigurationService") : "RPCS",
- get_typed_class(options.virt, "VirtualSystemManagementService") : "Management Service",
- get_typed_class(options.virt, "VirtualSystemMigrationService") : "MigrationService"}
+ rpcs = get_typed_class(options.virt, "ResourcePoolConfigurationService")
+ vsms = get_typed_class(options.virt, "VirtualSystemManagementService")
+ migrate = get_typed_class(options.virt, "VirtualSystemMigrationService")
+
+ servicelist = {rpcs : "RPCS",
+ vsms : "Management Service",
+ migrate : "MigrationService"}
conn = assoc.myWBEMConnection('http://%s' % options.ip,
(CIM_USER, CIM_PASS),
CIM_NS)
+ assoc_classname = get_typed_class(options.virt, "HostedService")
for k, v in servicelist.items():
- instanceref = CIMInstanceName(k,
- keybindings = {"Wrong" : v,
- "CreationClassName" : "wrong",
- "SystemCreationClassName" : host_sys.CreationClassName,
- "SystemName" : host_sys.Name})
- names = []
- try:
- names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService"))
- rc = 0
- except pywbem.CIMError, (rc, desc):
- if rc == exp_rc and desc.find(exp_desc) >= 0:
- logger.info("Got excepted rc code and error string")
- status = PASS
- else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
- except Exception, details:
- logger.error("Unknown exception happened")
- logger.error(details)
+ keys = {"Wrong" : v, "CreationClassName": k,\
+ "SystemCreationClassName": host_ccn, "SystemName" : host_name}
+ ret = try_assoc(conn, k, assoc_classname, keys, "Name",\
+ exp_values['invalid_name'], bug_no="")
+ if ret != PASS:
+ logger.error("------ FAILED: Invalid Name Key Name.------")
+ return FAIL
- if rc == 0:
- logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of %s input" % k)
- status = FAIL
+ keys = {"Name" : v, "Wrong": k, "SystemCreationClassName":\
+ host_ccn, "SystemName" : host_name}
+ ret = try_assoc(conn, k, assoc_classname, keys, "Name",\
+ exp_values['invalid_ccname'], bug_no="")
+ if ret != PASS:
+ logger.error("------ FAILED: Invalid Name Key Name.------")
+ return FAIL
- return status
+ return status
if __name__ == "__main__":
16 years, 2 months
[PATCH] [TEST] Add NETNS toggle to const.py; update LXC define system bits
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1223495957 25200
# Node ID c2c64b0ee95d55ac09375f0a3518d60fd569ee7d
# Parent 98c505b354576e9150943b9f7f1bfd4a70347dab
[TEST] Add NETNS toggle to const.py; update LXC define system bits.
Added LXC_netns_support to const.py - right now, this is hardcoded to False. In the future, this will dynamically detect whether the kernel supports NETNS (which is needed to create containers guests with network support).
Cleanup default_vssd_rasd_str() so that class_dasd() is used to create a Disk RASD for LXC guests, as well as KVM/Xen.
On undefine/destroy of LXC guests, don't remove the file at LXC_init_path
Extend LXCXML to subclass VirtCIM - this allows cim_define() to be called for LXC guests.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 98c505b35457 -r c2c64b0ee95d suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Oct 07 02:42:02 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Oct 08 12:59:17 2008 -0700
@@ -85,6 +85,7 @@
LXC_default_mp = '/tmp'
LXC_default_source = '/tmp/lxc_files'
LXC_default_mac = '11:22:33:aa:bb:cc'
+LXC_netns_support = False
parser = OptionParser()
parser.add_option("-i", "--ip", dest="ip", default="localhost",
diff -r 98c505b35457 -r c2c64b0ee95d suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Oct 07 02:42:02 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 08 12:59:17 2008 -0700
@@ -241,30 +241,25 @@
class_vssd = get_vssd_class(virt)
vssd = class_vssd(name=dom_name, virt=virt)
- # 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_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
+ elif virt == 'LXC':
+ disk_dev = const.LXC_default_mp
+ disk_source = const.LXC_default_source
+ d = class_dasd(disk_dev, disk_source, dom_name)
class_masd = get_masd_class(virt)
m = class_masd(
megabytes=mem_mb,
mallocunits=malloc_units,
name=dom_name)
+
+ # LXC only takes disk and memory device for now.
if virt == 'LXC':
return vssd.mof(), [d.mof(), m.mof()]
diff -r 98c505b35457 -r c2c64b0ee95d suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Oct 07 02:42:02 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 08 12:59:17 2008 -0700
@@ -328,8 +328,6 @@
return self.run(ip, 'define', self.xml_string)
def undefine(self, ip):
- if os.path.exists(const.LXC_init_path):
- os.remove(const.LXC_init_path)
return self.run(ip, 'undefine', self.dname)
def start(self, ip):
@@ -339,8 +337,6 @@
return self.run(ip, 'stop', self.dname)
def destroy(self, ip):
- if os.path.exists(const.LXC_init_path):
- os.remove(const.LXC_init_path)
return self.run(ip, 'destroy', self.dname)
def create(self, ip):
@@ -471,9 +467,7 @@
self.virt = virt
self.domain_name = dom_name
self.vssd = vsms.get_vssd_class(virt)(name=dom_name, virt=virt)
- self.dasd = vsms.get_dasd_class(virt)(dev=disk_dev,
- source=disk_source,
- name=dom_name)
+ self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name)
self.nasd = vsms.get_nasd_class(virt)(type=net_type,
mac=net_mac,
name=dom_name,
@@ -487,8 +481,11 @@
def cim_define(self, ip, ref_conf=None):
service = vsms.get_vsms_class(self.virt)(ip)
sys_settings = str(self.vssd)
- res_settings = [str(self.dasd), str(self.nasd),
- str(self.pasd), str(self.masd)]
+ if self.virt == 'LXC' and const.LXC_netns_support is False:
+ res_settings = [str(self.dasd), str(self.pasd), str(self.masd)]
+ else:
+ res_settings = [str(self.dasd), str(self.nasd),
+ str(self.pasd), str(self.masd)]
if ref_conf is None:
ref_conf = ' '
@@ -683,7 +680,7 @@
def set_vbridge(self, ip, net_name):
return self._set_vbridge(ip, 'XenFV', net_name)
-class LXCXML(VirtXML):
+class LXCXML(VirtXML, VirtCIM):
def __init__(self, test_dom=const.default_domname,
mem=const.default_memory,
@@ -693,6 +690,9 @@
net_name=const.default_network_name,
tty=const.LXC_default_tty):
VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus)
+ VirtCIM.__init__(self, 'LXC', test_dom, const.LXC_default_mp,
+ const.LXC_default_source, ntype, net_name, mac, vcpus,
+ mem, const.default_mallocunits)
self._os(const.LXC_init_path)
self._devices(mac, ntype, net_name, const.LXC_default_tty)
self.create_lxc_file(CIM_IP, const.LXC_init_path)
@@ -704,8 +704,12 @@
def _devices(self, net_mac, net_type, net_name, tty_set):
devices = self.get_node('/domain/devices')
- self.set_interface_details(devices, net_mac, net_type, net_name, 'LXC')
- interface = self.add_sub_node(devices, 'console', tty = tty_set)
+
+ if const.LXC_netns_support is True:
+ self.set_interface_details(devices, net_mac, net_type,
+ net_name, 'LXC')
+
+ self.add_sub_node(devices, 'console', tty = tty_set)
def create_lxc_file(self, ip, lxc_file):
try:
16 years, 2 months
[PATCH] [TEST] Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223361281 25200
# Node ID 628b846c366a0c97fa97c18a5a7e2185c265188f
# Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61
[TEST] Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 311bf6eda378 -r 628b846c366a suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Sun Oct 05 23:56:40 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Mon Oct 06 23:34:41 2008 -0700
@@ -25,16 +25,21 @@ import pywbem
import pywbem
from XenKvmLib import assoc
from XenKvmLib import enumclass
+from XenKvmLib.common_util import get_host_info
from XenKvmLib.common_util import try_assoc
from CimTest import Globals
from CimTest.Globals import logger
-from CimTest.ReturnCodes import PASS, FAIL
+from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
from XenKvmLib.const import do_main
from XenKvmLib.classes import get_typed_class
-expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \
- "desc" : "No such instance"
- }
+bug = "00007"
+expr_values = {
+ "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \
+ "desc" : "No such instance (CreationClassName)"},
+ "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \
+ "desc" : "No such instance (Name)"}
+ }
sup_types=['Xen', 'KVM', 'XenFV', 'LXC']
@do_main(sup_types)
@@ -42,30 +47,36 @@ def main():
options = main.options
status = PASS
keys = ['Name', 'CreationClassName']
- try:
- host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0]
- except Exception:
- host_cn = get_typed_class(options.virt, "HostSystem")
- logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn)
+ status, host_sys, host_cn = get_host_info(options.ip, options.virt)
+ if status != PASS:
+ logger.error("Error in calling get_host_info function")
return FAIL
conn = assoc.myWBEMConnection('http://%s' % options.ip,
(Globals.CIM_USER, Globals.CIM_PASS),
Globals.CIM_NS)
- classname = host_sys.CreationClassName
+ classname = host_cn
assoc_classname = get_typed_class(options.virt, "HostedResourcePool")
- keys = {"Name" : "wrong", "CreationClassName" : host_sys.CreationClassName}
- ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="")
+ keys = {"Name" : host_sys, "CreationClassName" : "wrong"}
+ ret = try_assoc(conn, classname, assoc_classname, keys, \
+ "Name", expr_values['invalid_ccname'], bug_no="")
if ret != PASS:
- logger.error("------ FAILED: Invalid Name Key Name.------")
- status = ret
+ if host_cn == 'Linux_ComputerSystem':
+ return XFAIL_RC(bug)
+ else:
+ logger.error("------ FAILED: Invalid CreationClassName Key Value.------")
+ status = ret
- keys = {"Wrong" : host_sys.Name, "CreationClassName" : host_sys.CreationClassName}
- ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="")
+ keys = {"Name" : "wrong", "CreationClassName" : host_cn}
+ ret = try_assoc(conn, classname, assoc_classname, keys, \
+ "CreationClassName", expr_values['invalid_name'], bug_no="")
if ret != PASS:
- logger.error("------ FAILED: Invalid Name Key Value.------")
- status = ret
+ if host_cn == 'Linux_ComputerSystem':
+ return XFAIL_RC(bug)
+ else:
+ logger.error("------ FAILED: Invalid Name Key Value.------")
+ status = ret
return status
if __name__ == "__main__":
16 years, 2 months
[PATCH] [TEST]#2 Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223516805 25200
# Node ID fb1e4aac03bb7c31ad393080fa84b355231f6127
# Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5
[TEST]#2 Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed
Updates from 1 to 2:
Chage error description in log error
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 285bc0174fb3 -r fb1e4aac03bb suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Wed Oct 08 03:03:37 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Wed Oct 08 18:46:45 2008 -0700
@@ -25,6 +25,7 @@ import sys
import sys
from XenKvmLib import assoc
from XenKvmLib import enumclass
+from XenKvmLib.common_util import get_host_info
from XenKvmLib.const import default_network_name
from CimTest import Globals
from CimTest.Globals import logger
@@ -39,12 +40,11 @@ def main():
status = PASS
keys = ['Name', 'CreationClassName']
- try:
- host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0]
- except Exception:
- host_cn = get_typed_class(options.virt, "HostSystem")
- logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn)
- return FAIL
+ status, host_sys, host_cn = get_host_info(options.ip, options.virt)
+ if status != PASS:
+ logger.error("Error in calling get_host_info function")
+ return FAIL
+
assoc_cn = get_typed_class(options.virt, "HostedResourcePool")
proc_cn = get_typed_class(options.virt, "ProcessorPool")
mem_cn = get_typed_class(options.virt, "MemoryPool")
@@ -61,13 +61,13 @@ def main():
try:
assoc_host = assoc.AssociatorNames(options.ip, assoc_cn, k, InstanceID = v)
except Exception:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % v)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn)
return FAIL
if len(assoc_host) == 1:
- if assoc_host[0].keybindings['Name'] != host_sys.Name:
+ if assoc_host[0].keybindings['Name'] != host_sys:
logger.error("Pool association returned wrong hostsystem")
status = FAIL
- if assoc_host[0].keybindings['CreationClassName'] != host_sys.CreationClassName:
+ if assoc_host[0].keybindings['CreationClassName'] != host_cn:
logger.error("Pool association returned wrong CreationClassName")
status = FAIL
if status != PASS:
16 years, 2 months
[PATCH] [TEST] Fix HostedResourcePool/01_forward.py to work with sblim base provider installed
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223359324 25200
# Node ID d81c2122fff796c7a08eb45cfe679f2e690e27bf
# Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61
[TEST] Fix HostedResourcePool/01_forward.py to work with sblim base provider installed
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 311bf6eda378 -r d81c2122fff7 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Sun Oct 05 23:56:40 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Mon Oct 06 23:02:04 2008 -0700
@@ -26,13 +26,15 @@ import sys
import sys
from XenKvmLib import assoc
from XenKvmLib import enumclass
+from XenKvmLib.common_util import get_host_info
from XenKvmLib.const import default_network_name
from CimTest import Globals
from CimTest.Globals import logger
-from CimTest.ReturnCodes import PASS, FAIL
+from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
from XenKvmLib.const import do_main, default_pool_name
from XenKvmLib.classes import get_typed_class
+bug = '00007'
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@do_main(sup_types)
def main():
@@ -40,19 +42,17 @@ def main():
status = FAIL
keys = ['Name', 'CreationClassName']
- try:
- host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0]
- except Exception:
- host_cn = get_typed_class(options.virt, "HostSystem")
- logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn)
+ status, host_sys, host_cn = get_host_info(options.ip, options.virt)
+ if status != PASS:
+ logger.error("Error in calling get_host_info function")
return FAIL
try:
assoc_cn = get_typed_class(options.virt, "HostedResourcePool")
pool = assoc.AssociatorNames(options.ip,
assoc_cn,
- host_sys.CreationClassName,
- Name = host_sys.Name,
- CreationClassName = host_sys.CreationClassName)
+ host_cn,
+ Name = host_sys,
+ CreationClassName = host_cn)
except Exception, details:
logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn)
logger.error("Exception:", details)
@@ -62,8 +62,11 @@ def main():
logger.error("System association failed")
return FAIL
elif len(pool) == 0:
- logger.error("No pool returned")
- return FAIL
+ if host_cn == 'Linux_ComputerSystem':
+ return XFAIL_RC(bug)
+ else:
+ logger.error("No pool returned")
+ return FAIL
for items in pool:
cname = items.classname
16 years, 2 months
[PATCH] [TEST] Fix a false positive in HostedResourcePool/01_forward.py
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223516283 25200
# Node ID 32b6d72c7eed7a92cfc82c2f6fda973885eb9fcc
# Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5
[TEST] Fix a false positive in HostedResourcePool/01_forward.py
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 285bc0174fb3 -r 32b6d72c7eed suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 03:03:37 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 18:38:03 2008 -0700
@@ -67,7 +67,8 @@ def main():
else:
logger.error("No pool returned")
return FAIL
-
+
+ status = FAIL
for items in pool:
cname = items.classname
if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0":
@@ -80,6 +81,9 @@ def main():
if cname.find("DiskPool") >=0 and \
items['InstanceID'] == "DiskPool/%s" % default_pool_name:
status = PASS
+ if status != PASS:
+ logger.error("HostedResourcePool information error")
+ return FAIL
return status
16 years, 2 months
[PATCH] [TEST] Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223359792 25200
# Node ID 0b599308e31a1865ab47b1c2d44d0887c409e139
# Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61
[TEST] Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 311bf6eda378 -r 0b599308e31a suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Sun Oct 05 23:56:40 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Mon Oct 06 23:09:52 2008 -0700
@@ -25,6 +25,7 @@ import sys
import sys
from XenKvmLib import assoc
from XenKvmLib import enumclass
+from XenKvmLib.common_util import get_host_info
from XenKvmLib.const import default_network_name
from CimTest import Globals
from CimTest.Globals import logger
@@ -39,12 +40,11 @@ def main():
status = PASS
keys = ['Name', 'CreationClassName']
- try:
- host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0]
- except Exception:
- host_cn = get_typed_class(options.virt, "HostSystem")
- logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn)
- return FAIL
+ status, host_sys, host_cn = get_host_info(options.ip, options.virt)
+ if status != PASS:
+ logger.error("Error in calling get_host_info function")
+ return FAIL
+
assoc_cn = get_typed_class(options.virt, "HostedResourcePool")
proc_cn = get_typed_class(options.virt, "ProcessorPool")
mem_cn = get_typed_class(options.virt, "MemoryPool")
@@ -64,10 +64,10 @@ def main():
logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % v)
return FAIL
if len(assoc_host) == 1:
- if assoc_host[0].keybindings['Name'] != host_sys.Name:
+ if assoc_host[0].keybindings['Name'] != host_sys:
logger.error("Pool association returned wrong hostsystem")
status = FAIL
- if assoc_host[0].keybindings['CreationClassName'] != host_sys.CreationClassName:
+ if assoc_host[0].keybindings['CreationClassName'] != host_cn:
logger.error("Pool association returned wrong CreationClassName")
status = FAIL
if status != PASS:
16 years, 2 months
[PATCH] Make MOF parser ignore NULL properties
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1223487138 25200
# Node ID 5fbf96fedcf7df32fccc3f989aa4520af8c9a264
# Parent 36c97d5c8c9f0eea12a87eae4e01bb80c9840ece
Make MOF parser ignore NULL properties
This just adds enough to the parser to allow something like:
Foo = NULL;
in the MOF object. It's just ignored, as would be expected.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 36c97d5c8c9f -r 5fbf96fedcf7 eo_util_lexer.l
--- a/eo_util_lexer.l Wed Sep 03 11:35:13 2008 -0700
+++ b/eo_util_lexer.l Wed Oct 08 10:32:18 2008 -0700
@@ -72,6 +72,12 @@
return(BOOLEAN);
}
+null |
+Null |
+NULL {
+ return(CIMNULL);
+ }
+
{INTEGER} {
eo_parse_lval.sint64 = atoll(eo_parse_text);
return(INTEGER);
diff -r 36c97d5c8c9f -r 5fbf96fedcf7 eo_util_parser.y
--- a/eo_util_parser.y Wed Sep 03 11:35:13 2008 -0700
+++ b/eo_util_parser.y Wed Oct 08 10:32:18 2008 -0700
@@ -60,6 +60,7 @@
%token <string> STRING
%token <boolean> BOOLEAN
%token <sint64> INTEGER
+%token CIMNULL
%%
@@ -126,6 +127,13 @@
CMSetProperty(*_INSTANCE, $1, &($3), CMPI_boolean);
free($1);
}
+
+ | PROPERTYNAME '=' CIMNULL ';'
+ {
+ EOTRACE("propertyname = %s\n"
+ "\ttype = NULL\n", $1);
+ free($1);
+ }
;
/* END OF RULES SECTION */
16 years, 2 months
[PATCH] [TEST] Fixing 01_forward.py of SDC
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1223460217 25200
# Node ID 91c75d1ff10baa5fcb705384549210648b4ad7a5
# Parent 814a0e67bb1023607349ecc9b95a4636aabcc24d
[TEST] Fixing 01_forward.py of SDC.
Tested with Xen, XenFV, KVM with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 814a0e67bb10 -r 91c75d1ff10b suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 08 02:50:21 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 08 03:03:37 2008 -0700
@@ -168,7 +168,16 @@ def verify_sdc_with_ac(virt, server, poo
try:
assoc_info = assoc.Associators(server, assoc_cname, cn,
InstanceID = instid)
- if len(assoc_info) != 4:
+
+ if 'DiskPool' in instid and (virt =='Xen' or virt == 'XenFV'):
+ # For Diskpool, we have info 1 for each of Min, Max,
+ # default, Increment and 1 for each of PV and FV
+ # hence 4 * 2 = 8 records
+ exp_len = 8
+ else:
+ exp_len = 4
+
+ if len(assoc_info) != exp_len:
logger.error("%s returned %i ResourcePool objects"
"instead 4", assoc_cname, len(assoc_info))
status = FAIL
16 years, 2 months