[PATCH] Fix pool_member_of() for Net devices of type network
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1211984997 25200
# Node ID edf43e3ad962d666500b682a19aea71267be7e4b
# Parent e987c6ce099434eddec21ca021eba5cd37c4e946
Fix pool_member_of() for Net devices of type network
Some assumptions were made in this code about what the source field contained
which were no longer correct when we added network (instead of bridge)
support. This patch checks the type and interprets the field correctly.
This fixes RAFP for domains with 'network' interfaces for me.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r e987c6ce0994 -r edf43e3ad962 src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c Tue May 20 10:33:56 2008 -0700
+++ b/src/Virt_DevicePool.c Wed May 28 07:29:57 2008 -0700
@@ -378,13 +378,20 @@
}
static char *_netpool_member_of(virConnectPtr conn,
- const char *bridge)
+ const struct net_device *ndev)
{
virNetworkPtr net = NULL;
const char *netname;
char *pool = NULL;
- net = bridge_to_network(conn, bridge);
+ if (STREQ(ndev->type, "bridge"))
+ net = bridge_to_network(conn, ndev->source);
+ else if (STREQ(ndev->type, "network"))
+ net = virNetworkLookupByName(conn, ndev->source);
+ else {
+ CU_DEBUG("Unhandled network type `%s'", ndev->type);
+ }
+
if (net == NULL)
goto out;
@@ -395,7 +402,7 @@
if (asprintf(&pool, "NetworkPool/%s", netname) == -1)
pool = NULL;
- CU_DEBUG("Determined pool: %s (%s, %s)", pool, bridge, netname);
+ CU_DEBUG("Determined pool: %s (%s, %s)", pool, ndev->source, netname);
out:
virNetworkFree(net);
@@ -435,7 +442,7 @@
for (i = 0; i < count; i++) {
if (STREQ((devs[i].id), dev)) {
result = _netpool_member_of(conn,
- devs[i].dev.net.source);
+ &devs[i].dev.net);
break;
}
}
16 years, 3 months
[PATCH] [TEST] LXC support for ComputerSystem.01, 02, 04, 05, 06, 22 & 23
by zli@linux.vnet.ibm.com
# HG changeset patch
# User Zhengang Li <lizg(a)cn.ibm.com>
# Date 1212078375 -28800
# Node ID 03df2f209f12969e86dbb0e7c5de0ce97e2a8c53
# Parent af35c2dcc8c55b876e03ac9535ff9365c95f2709
[TEST] LXC support for ComputerSystem.01, 02, 04, 05, 06, 22 & 23
Signed-off-by: Zhengang Li <lizg(a)cn.ibm.com>
diff -r af35c2dcc8c5 -r 03df2f209f12 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri May 30 00:26:15 2008 +0800
@@ -30,7 +30,7 @@
from CimTest import Globals
from CimTest.ReturnCodes import PASS, FAIL
-SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV']
+SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC']
@do_main(SUPPORTED_TYPES)
def main():
diff -r af35c2dcc8c5 -r 03df2f209f12 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri May 30 00:26:15 2008 +0800
@@ -31,7 +31,7 @@
from CimTest.Globals import do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
def clean_system(host, virt):
l = live.domain_list(host, virt)
diff -r af35c2dcc8c5 -r 03df2f209f12 suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Fri May 30 00:26:15 2008 +0800
@@ -38,7 +38,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 = "domguest"
@do_main(sup_types)
diff -r af35c2dcc8c5 -r 03df2f209f12 suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri May 30 00:26:15 2008 +0800
@@ -50,7 +50,7 @@
from XenKvmLib.common_util import call_request_state_change
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "DomST1"
mem = 128 # MB
bug_no = "00002"
diff -r af35c2dcc8c5 -r 03df2f209f12 suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Fri May 30 00:26:15 2008 +0800
@@ -51,7 +51,7 @@
from XenKvmLib.common_util import call_request_state_change
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "DomST1"
mem = 128 # MB
# Keeping the bug no for future reference
diff -r af35c2dcc8c5 -r 03df2f209f12 suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri May 30 00:26:15 2008 +0800
@@ -37,7 +37,7 @@
from CimTest import Globals
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "domgst"
@do_main(sup_types)
diff -r af35c2dcc8c5 -r 03df2f209f12 suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Fri May 30 00:24:45 2008 +0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Fri May 30 00:26:15 2008 +0800
@@ -47,7 +47,7 @@
from XenKvmLib.common_util import create_using_definesystem
from XenKvmLib.common_util import call_request_state_change
-sup_types = ['Xen', 'XenFV']
+sup_types = ['Xen', 'XenFV', 'LXC']
ACTIVE_STATE = 2
SUSPND_STATE = 9
16 years, 3 months
[PATCH] [TEST] LXC support using DefineSystem & VSMS.01
by zli@linux.vnet.ibm.com
# HG changeset patch
# User Zhengang Li <lizg(a)cn.ibm.com>
# Date 1212085020 -28800
# Node ID 555aeb0c467907a683e208d87ec67bb083d3d9e0
# Parent 9520aaa2b61210bb2038b5bf3be5bed3b711c78e
[TEST] LXC support using DefineSystem & VSMS.01
Signed-off-by: Zhengang Li <lizg(a)cn.ibm.com>
diff -r 9520aaa2b612 -r 555aeb0c4679 suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Fri May 30 00:30:02 2008 +0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Fri May 30 02:17:00 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 9520aaa2b612 -r 555aeb0c4679 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri May 30 00:30:02 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Fri May 30 02:17:00 2008 +0800
@@ -85,3 +85,4 @@
#vxml.LXCXML
LXC_init_path = os.path.join(_image_dir, 'cimtest_lxc_init')
LXC_default_tty = '/dev/ptmx'
+LXC_default_mp = '/tmp'
diff -r 9520aaa2b612 -r 555aeb0c4679 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri May 30 00:30:02 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri May 30 02:17:00 2008 +0800
@@ -66,6 +66,9 @@
class KVM_VirtualSystemManagementService(CIM_VirtualSystemManagementService):
pass
+class LXC_VirtualSystemManagementService(CIM_VirtualSystemManagementService):
+ pass
+
@eval_cls('VirtualSystemManagementService')
def get_vsms_class(virt):
pass
@@ -99,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 = ''
@@ -110,6 +115,9 @@
pass
class KVM_VirtualSystemSettingData(CIM_VirtualSystemSettingData):
+ pass
+
+class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData):
pass
@eval_cls('VirtualSystemSettingData')
@@ -131,6 +139,11 @@
class KVM_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData):
pass
+
+class LXC_DiskResourceAllocationSettingData(CIMClassMOF):
+ def __init__(self, mountpoint, name):
+ self.MountPoint = mountpoint
+ self.InstanceID = '%s/%s' % (name, mountpoint)
@eval_cls('DiskResourceAllocationSettingData')
def get_dasd_class(virt):
@@ -154,6 +167,9 @@
class KVM_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData):
pass
+class LXC_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData):
+ pass
+
@eval_cls('NetResourceAllocationSettingData')
def get_nasd_class(virt):
pass
@@ -172,6 +188,9 @@
pass
class KVM_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData):
+ pass
+
+class LXC_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData):
pass
@eval_cls('ProcResourceAllocationSettingData')
@@ -194,6 +213,9 @@
class KVM_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData):
pass
+class LXC_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData):
+ pass
+
@eval_cls('MemResourceAllocationSettingData')
def get_masd_class(virt):
pass
@@ -208,18 +230,25 @@
virt='Xen'):
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, 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
- d = class_dasd(
- dev=disk_dev,
- source=disk_source,
- name=dom_name)
class_nasd = get_nasd_class(virt)
if virt == 'KVM':
net_mac= const.KVM_default_mac
@@ -237,6 +266,6 @@
m = class_masd(
megabytes=mem_mb,
name=dom_name)
-
+
return vssd.mof(), [d.mof(), n.mof(), p.mof(), m.mof()]
16 years, 3 months
[PATCH] Set processor device type and id in parse_vcpu_device()
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1212005642 25200
# Node ID 19c940c809dde457eb16af15a9de0cb4ad87df1c
# Parent e987c6ce099434eddec21ca021eba5cd37c4e946
Set processor device type and id in parse_vcpu_device().
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r e987c6ce0994 -r 19c940c809dd libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Tue May 20 10:33:56 2008 -0700
+++ b/libxkutil/device_parsing.c Wed May 28 13:14:02 2008 -0700
@@ -351,6 +351,9 @@
goto err;
list->dev.vcpu.quantity = count;
+
+ list->type = CIM_RES_TYPE_PROC;
+ list->id = strdup("proc");
*vdevs = list;
16 years, 3 months
CimTest Report for KVM on F9 28-05-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 : 592
CIMTEST : 159
=======================================================
PASS : 102
FAIL : 9
XFAIL : 2
SKIP : 16
-----------------
Total : 129
=======================================================
List of tc that are failing
HostSystem - 02_hostsystem_to_rasd.py: FAIL
NetworkPort - 01_netport.py: FAIL
RASD - 01_verify_rasd_fields.py: FAIL
ResourceAllocationFromPool - 02_reverse.py: FAIL
ResourceAllocationFromPool - 05_RAPF_err.py: FAIL
All the above fail because of the KVMXML changes.
Will be submitting fix for them.
NetworkPort - 03_user_netport.py: FAIL
VSSD - 03_vssd_gi_errs.py: FAIL
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.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: PASS
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
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
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: 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: 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: FAIL
ERROR - LinkTechnology should be set to `2' instead of `0'
ERROR - Checked interface 00:11:22:33:44:55
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: FAIL
ERROR - No associated pool for demo2/0
CIM_ERR_NOT_FOUND: No such instance (demo2/0)
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
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
VirtualSystemManagementService - 06_addresource.py: PASS
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, 3 months
[PATCH] Add a default pool configuration file to be installed when libvirt version
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1211900260 25200
# Node ID 27e8f7a666411251f721bfac9030a00f391c8855
# Parent f00dd77c664c258551c5f884a0bee5d842241e4e
Add a default pool configuration file to be installed when libvirt version
is older than 0.4.0
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r f00dd77c664c -r 27e8f7a66641 Makefile.am
--- a/Makefile.am Tue May 20 11:24:39 2008 -0400
+++ b/Makefile.am Tue May 27 07:57:40 2008 -0700
@@ -101,7 +101,8 @@
EXTRA_DIST = schema $(pkgdata_DATA) $(pkgdata_SCRIPTS) \
libvirt-cim.spec.in libvirt-cim.spec \
doc/CodingStyle doc/SubmittingPatches \
- .changeset .revision
+ .changeset .revision \
+ examples/diskpool.conf
preinstall:
sh -x base_schema/install_base_schema.sh `pwd`/base_schema
@@ -111,6 +112,7 @@
postinstall:
sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS)
sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS)
+ virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true
preuninstall:
sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS)
diff -r f00dd77c664c -r 27e8f7a66641 acinclude.m4
--- a/acinclude.m4 Tue May 20 11:24:39 2008 -0400
+++ b/acinclude.m4 Tue May 27 07:57:40 2008 -0700
@@ -312,6 +312,8 @@
AC_DEFUN([DEFINE_DISK_CONFIG],
[
AC_DEFINE_UNQUOTED([DISK_POOL_CONFIG], "$1", [Disk pool config filepath.])
+ DISK_POOL_CONFIG=$1
+ AC_SUBST(DISK_POOL_CONFIG)
]
)
diff -r f00dd77c664c -r 27e8f7a66641 examples/diskpool.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/diskpool.conf Tue May 27 07:57:40 2008 -0700
@@ -0,0 +1,1 @@
+Default /
16 years, 3 months
[PATCH] [TEST] Fixing the tc which failed bcs of the vxml.py and const.py changes for KVM
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1211886844 25200
# Node ID 6a273db93afc6cd02702eb090251854ad74a7ff2
# Parent ec679dca161f99a00dfae18dd360f17611d4a1ba
[TEST] Fixing the tc which failed bcs of the vxml.py and const.py changes for KVM.
This patch needs the changes made to KVMXML to make use network as the deafult net_type.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r ec679dca161f -r 6a273db93afc suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py
--- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue May 27 03:25:54 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue May 27 04:14:04 2008 -0700
@@ -58,7 +58,7 @@ from CimTest.ReturnCodes import PASS, FA
from CimTest.ReturnCodes import PASS, FAIL
from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \
verify_diskrasd_values, verify_memrasd_values
-from XenKvmLib.const import CIM_REV
+from XenKvmLib.const import CIM_REV, KVM_default_net_type
sup_types = ['Xen', 'KVM', 'XenFV']
@@ -103,11 +103,14 @@ def init_list(vsxml, virt="Xen"):
"VirtualQuantity" : (test_mem * 1024),
}
}
+ if virt == 'KVM':
+ rasd_values[net_cn]['ntype2'] = KVM_default_net_type
+
if CIM_REV < rev:
- rasd_values[mem_cn]['AllocationUnits'] = "MegaBytes"
+ rasd_values[mem_cn]['AllocationUnits'] = "MegaBytes"
if CIM_REV < proc_instid_rev:
- rasd_values[proc_cn]['InstanceID'] = '%s/%s' %(test_dom, 0)
+ rasd_values[proc_cn]['InstanceID'] = '%s/%s' %(test_dom, 0)
return rasd_values
diff -r ec679dca161f -r 6a273db93afc suites/libvirt-cim/cimtest/NetworkPort/01_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Tue May 27 03:25:54 2008 -0700
+++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Tue May 27 04:14:04 2008 -0700
@@ -39,11 +39,13 @@ from CimTest.Globals import logger
from CimTest.Globals import logger
from CimTest.Globals import do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
+from XenKvmLib import const
sup_types = ['Xen', 'KVM', 'XenFV']
test_dom = "test_domain"
test_mac = "00:11:22:33:44:55"
+const.KVM_default_net_type='bridge'
@do_main(sup_types)
def main():
diff -r ec679dca161f -r 6a273db93afc suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py
--- a/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Tue May 27 03:25:54 2008 -0700
+++ b/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Tue May 27 04:14:04 2008 -0700
@@ -54,7 +54,7 @@ from XenKvmLib import vxml
from XenKvmLib import vxml
from XenKvmLib.classes import get_typed_class
from XenKvmLib import rasd
-from XenKvmLib.const import CIM_REV
+from XenKvmLib.const import CIM_REV, KVM_default_net_type
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
@@ -81,6 +81,9 @@ def init_list(xml, disk, virt="Xen"):
"ntype1" : "bridge",
"ntype2" : "ethernet",
"CreationClassName" : get_typed_class(virt, rasd.nasd_cn)}
+ if virt == 'KVM':
+ netrasd['ntype2'] = KVM_default_net_type
+
address = xml.xml_get_disk_source()
diskrasd = {
"InstanceID" : '%s/%s' % (test_dom, disk),
diff -r ec679dca161f -r 6a273db93afc suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Tue May 27 03:25:54 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Tue May 27 04:14:04 2008 -0700
@@ -55,10 +55,12 @@ from CimTest.Globals import do_main, pla
from CimTest.Globals import do_main, platform_sup
from XenKvmLib.vxml import get_class
from XenKvmLib.classes import get_typed_class
+from XenKvmLib import const
test_dom = "RAPF_domain"
test_mac = "00:11:22:33:44:aa"
test_vcpus = 1
+const.KVM_default_net_type='bridge'
def get_unique_bridge():
bridge = "invalid-bridge"
16 years, 3 months
[PATCH] [TEST] Modifying the KVMXML to make use network as the deafult net_type
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1211804430 25200
# Node ID 3e9db2a1534d0565e06596b3ebebd33c09bd6587
# Parent 3233a070377270931b4cc1d790b6782fee17d1b6
[TEST] Modifying the KVMXML to make use network as the deafult net_type.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 3233a0703772 -r 3e9db2a1534d suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Mon May 26 05:20:30 2008 -0700
@@ -66,7 +66,7 @@ KVM_secondary_disk_path = os.path.join(_
KVM_secondary_disk_path = os.path.join(_image_dir, 'default-kvm-dimage.2ND')
KVM_default_disk_dev = 'hda'
KVM_default_mac = '11:22:33:aa:bb:cc'
-KVM_default_net_type = 'bridge'
+KVM_default_net_type = 'network'
# vxml.XenFVXML
s, o = platform.architecture()
diff -r 3233a0703772 -r 3e9db2a1534d suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon May 26 05:20:30 2008 -0700
@@ -574,8 +574,30 @@ class KVMXML(VirtXML):
interface = self.add_sub_node(devices, 'interface', type=net_type)
self.add_sub_node(interface, 'mac', address=net_mac)
+
if net_type == 'bridge':
self.set_vbridge(CIM_IP)
+ elif net_type == 'network':
+ self.set_vnetwork(interface)
+ else:
+ logger.error("%s is not a valid network type", net_type)
+ sys.exit(1)
+
+ def set_vnetwork(self, interface):
+ network_list = live.net_list(CIM_IP, virt='KVM')
+ if len(network_list) > 0:
+ nname = network_list[0]
+ else:
+ logger.info('No virutal network found')
+ logger.info('Trying to create one ......')
+ netxml = NetXML(CIM_IP, virt='KVM')
+ ret = netxml.create_vnet()
+ if not ret:
+ logger.error('Failed to create the virtual network "%s"',
+ netxml.net_name)
+ sys.exit(SKIP)
+ nname = netxml.xml_get_netpool_name()
+ self.add_sub_node(interface, 'source', network=nname)
def set_emulator(self, emu):
return self._set_emulator(emu)
16 years, 3 months
[PATCH] [TEST] Update EnabledLogicalElementCapabilities.01&02 for LXC support
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1211896734 -28800
# Node ID d84f01d8f9583427271f4238d953e0587fb8a82a
# Parent 3233a070377270931b4cc1d790b6782fee17d1b6
[TEST] Update EnabledLogicalElementCapabilities.01&02 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3233a0703772 -r d84f01d8f958 suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Tue May 27 21:58:54 2008 +0800
@@ -29,7 +29,7 @@
from VirtLib import live
from VirtLib import utils
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@do_main(sup_types)
def main():
diff -r 3233a0703772 -r d84f01d8f958 suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py
--- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py Tue May 27 21:58:54 2008 +0800
@@ -58,7 +58,7 @@
from CimTest.ReturnCodes import PASS, FAIL
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
expr_values = {
"invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, \
diff -r 3233a0703772 -r d84f01d8f958 suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Tue May 27 21:58:54 2008 +0800
@@ -141,6 +141,9 @@
pass
class KVM_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities):
+ pass
+
+class LXC_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities):
pass
class Xen_DiskPool(CIM_ResourcePool):
16 years, 3 months
[PATCH] [TEST] Make RHEL 5 XenFV guest grub conf use hda
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1211564341 25200
# Node ID 10f6cc2ec9940971f636bfd10b9f518c4c5d1487
# Parent 3233a070377270931b4cc1d790b6782fee17d1b6
[TEST] Make RHEL 5 XenFV guest grub conf use hda.
It looks like qemu on RHEL emulates an ide drive, not a scsi drive.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 3233a0703772 -r 10f6cc2ec994 suites/libvirt-cim/images/xmt-makefv.sh
--- a/suites/libvirt-cim/images/xmt-makefv.sh Fri May 23 18:14:28 2008 +0800
+++ b/suites/libvirt-cim/images/xmt-makefv.sh Fri May 23 10:39:01 2008 -0700
@@ -14,6 +14,8 @@
PARTED="parted -s"
TMPMOUNT=/tmp/cimtest_image_temp
SIZE=16
+
+IS_RHEL=`cat /etc/issue | awk 'BEGIN { FS = "Red Hat Enterprise Linux Server"} ; { print $2 }'`
die() {
echo "FAILED: $i" >&2
@@ -110,10 +112,19 @@
timeout 1
title Test Environment
root (hd0,0)
+EOF
+
+if [ -z $IS_RHEL]; then
+ cat >>${root}/grub/grub.conf <<EOF
+ kernel /vmlinuz root=/dev/hda1
+ initrd /initrd
+EOF
+else
+ cat >>${root}/grub/grub.conf <<EOF
kernel /vmlinuz root=/dev/sda1
initrd /initrd
EOF
-
+fi
}
ramdisk=$1
16 years, 3 months