[PATCH] [TEST] Add cim_destroy to VirtCIM class
by zli@linux.vnet.ibm.com
# HG changeset patch
# User Zhengang Li <lizg(a)cn.ibm.com>
# Date 1208850226 -28800
# Node ID 2357fe747faf722cbadcb8f25024e2f6f4522045
# Parent fbc408651246e797551d246fdbe995f92609a4c6
[TEST] Add cim_destroy to VirtCIM class
Signed-off-by: Zhengang Li <lizg(a)cn.ibm.com>
diff -r fbc408651246 -r 2357fe747faf suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Apr 22 15:33:50 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Apr 22 15:43:46 2008 +0800
@@ -42,7 +42,7 @@ from XenKvmLib import const
from XenKvmLib import const
from CimTest.Globals import logger, CIM_IP, CIM_PORT, CIM_NS, CIM_USER, CIM_PASS
from CimTest.ReturnCodes import SKIP
-from XenKvmLib.classes import virt_types
+from XenKvmLib.classes import virt_types, get_typed_class
class XMLClass:
xml_string = ""
@@ -427,6 +427,20 @@ class VirtCIM:
set_uuid(viruuid(self.domain_name, ip, self.virt))
return True
+ def cim_destroy(self, ip):
+ service = vsms.get_vsms_class(self.virt)(ip)
+ cs_cn = get_typed_class(self.virt, 'ComputerSystem')
+ target = pywbem.cim_obj.CIMInstanceName(cs_cn, keybindings = {
+ 'Name': self.domain_name,
+ 'CreationClassName': cs_cn})
+ try:
+ ret = service.DestroySystem(AffectedSystem=target)
+ except Exception, details:
+ logger.error('Error invoking DestroySystem')
+ logger.error('Got error %s with exception %s' % (details,
+ details.__class__.__name__))
+ return False
+ return ret[0] == 0
class XenXML(VirtXML, VirtCIM):
16 years, 8 months
[PATCH] Add the entries to all the std_assoc blocks to support LXC domains
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1208884871 25200
# Node ID 5713d5e112fc71a3478b5fc2d6a8a9a93b4905a5
# Parent c48de3c7541217fce53add72cbd7a2d50fa3e2c8
Add the entries to all the std_assoc blocks to support LXC domains
I haven't hand-tested all of these, but we should be able to get that done
by adding LXC to the list of supported types in the various tests.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_ElementAllocatedFromPool.c
--- a/src/Virt_ElementAllocatedFromPool.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_ElementAllocatedFromPool.c Tue Apr 22 10:21:11 2008 -0700
@@ -176,7 +176,11 @@ static char* antecedent[] = {
"KVM_ProcessorPool",
"KVM_MemoryPool",
"KVM_NetworkPool",
- "KVM_DiskPool",
+ "KVM_DiskPool",
+ "LXC_ProcessorPool",
+ "LXC_MemoryPool",
+ "LXC_NetworkPool",
+ "LXC_DiskPool",
NULL
};
@@ -189,12 +193,17 @@ static char* dependent[] = {
"KVM_Memory",
"KVM_NetworkPort",
"KVM_LogicalDisk",
+ "LXC_Processor",
+ "LXC_Memory",
+ "LXC_NetworkPort",
+ "LXC_LogicalDisk",
NULL
};
static char* assoc_classname[] = {
"Xen_ElementAllocatedFromPool",
- "KVM_ElementAllocatedFromPool",
+ "KVM_ElementAllocatedFromPool",
+ "LXC_ElementAllocatedFromPool",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_ElementCapabilities.c
--- a/src/Virt_ElementCapabilities.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_ElementCapabilities.c Tue Apr 22 10:21:11 2008 -0700
@@ -295,23 +295,28 @@ LIBVIRT_CIM_DEFAULT_MAKEREF()
static char* assoc_classname[] = {
"Xen_ElementCapabilities",
- "KVM_ElementCapabilities",
+ "KVM_ElementCapabilities",
+ "LXC_ElementCapabilities",
NULL
};
static char* host_system[] = {
"Xen_HostSystem",
"KVM_HostSystem",
+ "LXC_HostSystem",
NULL
};
static char* host_sys_and_service[] = {
"Xen_HostSystem",
+ "Xen_VirtualSystemManagementService",
+ "Xen_VirtualSystemMigrationService",
"KVM_HostSystem",
- "Xen_VirtualSystemManagementService",
"KVM_VirtualSystemManagementService",
- "Xen_VirtualSystemMigrationService",
"KVM_VirtualSystemMigrationService",
+ "LXC_HostSystem",
+ "LXC_VirtualSystemManagementService",
+ "LXC_VirtualSystemMigrationService",
NULL
};
@@ -320,6 +325,8 @@ static char* virtual_system_management_c
"Xen_VirtualSystemMigrationCapabilities",
"KVM_VirtualSystemManagementCapabilities",
"KVM_VirtualSystemMigrationCapabilities",
+ "LXC_VirtualSystemManagementCapabilities",
+ "LXC_VirtualSystemMigrationCapabilities",
NULL,
};
@@ -354,6 +361,7 @@ static char* service[] = {
"KVM_VirtualSystemManagementService",
"Xen_VirtualSystemMigrationService",
"KVM_VirtualSystemMigrationService",
+ "LXC_VirtualSystemMigrationService",
NULL
};
@@ -373,12 +381,14 @@ static char* computer_system[] = {
static char* computer_system[] = {
"Xen_ComputerSystem",
"KVM_ComputerSystem",
+ "LXC_ComputerSystem",
NULL
};
static char* enabled_logical_element_capabilities[] = {
"Xen_EnabledLogicalElementCapabilities",
"KVM_EnabledLogicalElementCapabilities",
+ "LXC_EnabledLogicalElementCapabilities",
NULL
};
@@ -411,6 +421,7 @@ static char* allocation_capabilities[] =
static char* allocation_capabilities[] = {
"Xen_AllocationCapabilities",
"KVM_AllocationCapabilities",
+ "LXC_AllocationCapabilities",
NULL
};
@@ -423,6 +434,10 @@ static char* resource_pool[] = {
"KVM_MemoryPool",
"KVM_NetworkPool",
"KVM_DiskPool",
+ "LXC_ProcessorPool",
+ "LXC_MemoryPool",
+ "LXC_NetworkPool",
+ "LXC_DiskPool",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_ElementConformsToProfile.c
--- a/src/Virt_ElementConformsToProfile.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_ElementConformsToProfile.c Tue Apr 22 10:21:11 2008 -0700
@@ -209,7 +209,8 @@ LIBVIRT_CIM_DEFAULT_MAKEREF()
static char* conformant_standard[] = {
"Xen_RegisteredProfile",
- "KVM_RegisteredProfile",
+ "KVM_RegisteredProfile",
+ "LXC_RegisteredProfile",
NULL
};
@@ -218,12 +219,15 @@ static char* managed_element[] = {
"Xen_ComputerSystem",
"KVM_HostSystem",
"KVM_ComputerSystem",
+ "LXC_HostSystem",
+ "LXC_ComputerSystem",
NULL
};
static char* assoc_classname[] = {
"Xen_ElementConformsToProfile",
- "KVM_ElementConformsToProfile",
+ "KVM_ElementConformsToProfile",
+ "LXC_ElementConformsToProfile",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_ElementSettingData.c
--- a/src/Virt_ElementSettingData.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_ElementSettingData.c Tue Apr 22 10:21:11 2008 -0700
@@ -117,7 +117,8 @@ static CMPIInstance *make_ref(const CMPI
static char* virtual_system_setting_data[] = {
"Xen_VirtualSystemSettingData",
- "KVM_VirtualSystemSettingData",
+ "KVM_VirtualSystemSettingData",
+ "LXC_VirtualSystemSettingData",
NULL
};
@@ -130,12 +131,17 @@ static char* resource_allocation_setting
"KVM_MemResourceAllocationSettingData",
"KVM_NetResourceAllocationSettingData",
"KVM_ProcResourceAllocationSettingData",
+ "LXC_DiskResourceAllocationSettingData",
+ "LXC_MemResourceAllocationSettingData",
+ "LXC_NetResourceAllocationSettingData",
+ "LXC_ProcResourceAllocationSettingData",
NULL
};
static char* assoc_classname[] = {
"Xen_ElementSettingData",
- "KVM_ElementSettingData",
+ "KVM_ElementSettingData",
+ "LXC_ElementSettingData",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_HostedDependency.c
--- a/src/Virt_HostedDependency.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_HostedDependency.c Tue Apr 22 10:21:11 2008 -0700
@@ -82,19 +82,22 @@ LIBVIRT_CIM_DEFAULT_MAKEREF()
static char* antecedent[] = {
"Xen_ComputerSystem",
- "KVM_ComputerSystem",
+ "KVM_ComputerSystem",
+ "LXC_ComputerSystem",
NULL
};
static char* dependent[] = {
"Xen_HostSystem",
"KVM_HostSystem",
+ "LXC_HostSystem",
NULL
};
static char* assoc_classname[] = {
"Xen_HostedDependency",
- "KVM_HostedDependency",
+ "KVM_HostedDependency",
+ "LXC_HostedDependency",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_HostedResourcePool.c
--- a/src/Virt_HostedResourcePool.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_HostedResourcePool.c Tue Apr 22 10:21:11 2008 -0700
@@ -87,6 +87,7 @@ static char* group_component[] = {
static char* group_component[] = {
"Xen_HostSystem",
"KVM_HostSystem",
+ "LXC_HostSystem",
NULL
};
@@ -99,12 +100,17 @@ static char* part_component[] = {
"KVM_MemoryPool",
"KVM_NetworkPool",
"KVM_DiskPool",
+ "LXC_ProcessorPool",
+ "LXC_MemoryPool",
+ "LXC_NetworkPool",
+ "LXC_DiskPool",
NULL
};
static char* assoc_classname[] = {
"Xen_HostedResourcePool",
- "KVM_HostedResourcePool",
+ "KVM_HostedResourcePool",
+ "LXC_HostedResourcePool",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_HostedService.c
--- a/src/Virt_HostedService.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_HostedService.c Tue Apr 22 10:21:11 2008 -0700
@@ -119,6 +119,7 @@ static char* antecedent[] = {
static char* antecedent[] = {
"Xen_HostSystem",
"KVM_HostSystem",
+ "LXC_HostSystem",
NULL
};
@@ -129,12 +130,16 @@ static char* dependent[] = {
"KVM_ResourcePoolConfigurationService",
"KVM_VirtualSystemManagementService",
"KVM_VirtualSystemMigrationService",
+ "LXC_ResourcePoolConfigurationService",
+ "LXC_VirtualSystemManagementService",
+ "LXC_VirtualSystemMigrationService",
NULL
};
static char* assoc_classname[] = {
"Xen_HostedService",
- "KVM_HostedService",
+ "KVM_HostedService",
+ "LXC_HostedService",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_ReferencedProfile.c
--- a/src/Virt_ReferencedProfile.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_ReferencedProfile.c Tue Apr 22 10:21:11 2008 -0700
@@ -176,13 +176,15 @@ static CMPIInstance *make_ref(const CMPI
static char* registered_profile[] = {
"Xen_RegisteredProfile",
- "KVM_RegisteredProfile",
+ "KVM_RegisteredProfile",
+ "LXC_RegisteredProfile",
NULL
};
static char* assoc_classname[] = {
"Xen_ReferencedProfile",
- "KVM_ReferencedProfile",
+ "KVM_ReferencedProfile",
+ "LXC_ReferencedProfile",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_ResourceAllocationFromPool.c
--- a/src/Virt_ResourceAllocationFromPool.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_ResourceAllocationFromPool.c Tue Apr 22 10:21:11 2008 -0700
@@ -183,6 +183,10 @@ static char* antecedent[] = {
"KVM_MemoryPool",
"KVM_NetworkPool",
"KVM_DiskPool",
+ "LXC_ProcessorPool",
+ "LXC_MemoryPool",
+ "LXC_NetworkPool",
+ "LXC_DiskPool",
NULL
};
@@ -195,12 +199,17 @@ static char* dependent[] = {
"KVM_MemResourceAllocationSettingData",
"KVM_NetResourceAllocationSettingData",
"KVM_ProcResourceAllocationSettingData",
+ "LXC_DiskResourceAllocationSettingData",
+ "LXC_MemResourceAllocationSettingData",
+ "LXC_NetResourceAllocationSettingData",
+ "LXC_ProcResourceAllocationSettingData",
NULL
};
static char* assoc_classname[] = {
"Xen_ResourceAllocationFromPool",
- "KVM_ResourceAllocationFromPool",
+ "KVM_ResourceAllocationFromPool",
+ "LXC_ResourceAllocationFromPool",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_SettingsDefineCapabilities.c Tue Apr 22 10:21:11 2008 -0700
@@ -924,6 +924,7 @@ static char* group_component[] = {
static char* group_component[] = {
"Xen_AllocationCapabilities",
"KVM_AllocationCapabilities",
+ "LXC_AllocationCapabilities",
NULL
};
@@ -936,12 +937,17 @@ static char* part_component[] = {
"KVM_MemResourceAllocationSettingData",
"KVM_NetResourceAllocationSettingData",
"KVM_ProcResourceAllocationSettingData",
+ "LXC_DiskResourceAllocationSettingData",
+ "LXC_MemResourceAllocationSettingData",
+ "LXC_NetResourceAllocationSettingData",
+ "LXC_ProcResourceAllocationSettingData",
NULL
};
static char* assoc_classname[] = {
"Xen_SettingsDefineCapabilities",
- "KVM_SettingsDefineCapabilities",
+ "KVM_SettingsDefineCapabilities",
+ "LXC_SettingsDefineCapabilities",
NULL
};
@@ -974,12 +980,14 @@ static char* migrate_cap[] = {
static char* migrate_cap[] = {
"Xen_VirtualSystemMigrationCapabilities",
"KVM_VirtualSystemMigrationCapabilities",
+ "LXC_VirtualSystemMigrationCapabilities",
NULL
};
static char* migrate_sd[] = {
"Xen_VirtualSystemMigrationSettingData",
"KVM_VirtualSystemMigrationSettingData",
+ "LXC_VirtualSystemMigrationSettingData",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_SettingsDefineState.c
--- a/src/Virt_SettingsDefineState.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_SettingsDefineState.c Tue Apr 22 10:21:11 2008 -0700
@@ -205,6 +205,10 @@ static char* logical_device[] = {
"KVM_Memory",
"KVM_NetworkPort",
"KVM_LogicalDisk",
+ "LXC_Processor",
+ "LXC_Memory",
+ "LXC_NetworkPort",
+ "LXC_LogicalDisk",
NULL
};
@@ -217,24 +221,31 @@ static char* resource_allocation_setting
"KVM_MemResourceAllocationSettingData",
"KVM_NetResourceAllocationSettingData",
"KVM_ProcResourceAllocationSettingData",
+ "LXC_DiskResourceAllocationSettingData",
+ "LXC_MemResourceAllocationSettingData",
+ "LXC_NetResourceAllocationSettingData",
+ "LXC_ProcResourceAllocationSettingData",
NULL
};
static char* computer_system[] = {
"Xen_ComputerSystem",
"KVM_ComputerSystem",
+ "LXC_ComputerSystem",
NULL
};
static char* virtual_system_setting_data[] = {
"Xen_VirtualSystemSettingData",
- "KVM_VirtualSystemSettingData",
+ "KVM_VirtualSystemSettingData",
+ "LXC_VirtualSystemSettingData",
NULL
};
static char* assoc_classname[] = {
"Xen_SettingsDefineState",
- "KVM_SettingsDefineState",
+ "KVM_SettingsDefineState",
+ "LXC_VirtualSystemSettingData",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_SystemDevice.c
--- a/src/Virt_SystemDevice.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_SystemDevice.c Tue Apr 22 10:21:11 2008 -0700
@@ -125,6 +125,7 @@ static char* group_component[] = {
static char* group_component[] = {
"Xen_ComputerSystem",
"KVM_ComputerSystem",
+ "LXC_ComputerSystem",
NULL
};
@@ -137,12 +138,17 @@ static char* part_component[] = {
"KVM_Memory",
"KVM_NetworkPort",
"KVM_LogicalDisk",
+ "LXC_Processor",
+ "LXC_Memory",
+ "LXC_NetworkPort",
+ "LXC_LogicalDisk",
NULL
};
static char* assoc_classname[] = {
"Xen_SystemDevice",
- "KVM_SystemDevice",
+ "KVM_SystemDevice",
+ "LXC_SystemDevice",
NULL
};
diff -r c48de3c75412 -r 5713d5e112fc src/Virt_VSSDComponent.c
--- a/src/Virt_VSSDComponent.c Fri Apr 18 11:49:24 2008 -0700
+++ b/src/Virt_VSSDComponent.c Tue Apr 22 10:21:11 2008 -0700
@@ -122,6 +122,7 @@ static char* group_component[] = {
static char* group_component[] = {
"Xen_VirtualSystemSettingData",
"KVM_VirtualSystemSettingData",
+ "LXC_VirtualSystemSettingData",
NULL
};
@@ -134,12 +135,17 @@ static char* part_component[] = {
"KVM_MemResourceAllocationSettingData",
"KVM_NetResourceAllocationSettingData",
"KVM_ProcResourceAllocationSettingData",
+ "LXC_DiskResourceAllocationSettingData",
+ "LXC_MemResourceAllocationSettingData",
+ "LXC_NetResourceAllocationSettingData",
+ "LXC_ProcResourceAllocationSettingData",
NULL
};
static char* assoc_classname[] = {
"Xen_VirtualSystemSettingDataComponent",
- "KVM_VirtualSystemSettingDataComponent",
+ "KVM_VirtualSystemSettingDataComponent",
+ "LXC_VirtualSystemSettingDataComponent",
NULL
};
16 years, 8 months
[PATCH] Fix indication_tester to send proper Content-Type
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1208836847 25200
# Node ID 00549613964a06a76d614151c3dfa86881169177
# Parent fdd1e960ba1d092dffe072d373824baca5276877
Fix indication_tester to send proper Content-Type.
Changed the Content-Type from text/cimxml to application/xml. Also change the exception text to print the request return code and error message.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r fdd1e960ba1d -r 00549613964a tools/indication_tester.py
--- a/tools/indication_tester.py Fri Apr 18 14:18:01 2008 -0700
+++ b/tools/indication_tester.py Mon Apr 21 21:00:47 2008 -0700
@@ -317,7 +317,7 @@
headers = {"CIMOperation" : "MethodCall",
"CIMMethod" : method,
"CIMObject" : "root/PG_Interop",
- "Content-Type" : "text/cimxml"}
+ "Content-Type" : 'application/xml; charset="utf-8"'}
if auth_hdr:
headers["Authorization"] = "Basic %s" % auth_hdr
@@ -325,7 +325,8 @@
conn.request("POST", "/cimom", body, headers)
resp = conn.getresponse()
if not resp.getheader("content-length"):
- raise Exception("Authentication (or request) Failed!")
+ raise Exception("Request Failed: %d %s" %
+ (resp.status, resp.reason))
resp.read()
16 years, 8 months
[PATCH] [TEST] Adding XenFV and KVM support to 03_vssd_gi_errs of VSSD
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1208863401 -19800
# Node ID f2f2fd56e988b60088f4e533592b110a274b5b8a
# Parent 9b46a2dcbecd8a7c00a12a667b6530a629c280da
[TEST] Adding XenFV and KVM support to 03_vssd_gi_errs of VSSD
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 9b46a2dcbecd -r f2f2fd56e988 suites/libvirt-cim/cimtest/VSSD/03_vssd_gi_errs.py
--- a/suites/libvirt-cim/cimtest/VSSD/03_vssd_gi_errs.py Tue Apr 22 16:52:00 2008 +0530
+++ b/suites/libvirt-cim/cimtest/VSSD/03_vssd_gi_errs.py Tue Apr 22 16:53:21 2008 +0530
@@ -4,6 +4,7 @@
#
# Authors:
# Anoop V Chakkalakkal<anoop.vijayan(a)in.ibm.com>
+# Deepti B. Kalakeri <dkalaker(a)in.ibm.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
@@ -50,20 +51,15 @@
import sys
import pywbem
-from VirtLib import utils
from CimTest.ReturnCodes import PASS, FAIL
-from CimTest.Globals import logger, do_main
+from CimTest.Globals import log_param, logger, do_main, platform_sup
from CimTest.Globals import CIM_PASS, CIM_NS, CIM_USER
from XenKvmLib import assoc
-from XenKvmLib.test_xml import testxml
+from XenKvmLib.vxml import get_class
from XenKvmLib.common_util import try_getinstance
-from XenKvmLib.test_doms import test_domain_function, destroy_and_undefine_all
+from XenKvmLib.test_doms import destroy_and_undefine_all
-sup_types = ['Xen']
-
-VSType = "Xen"
-test_dom = "new"
-classname = "Xen_VirtualSystemSettingData"
+test_dom = "VSSD_domain"
expr_values = {
"INVALID_InstID_Keyname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
@@ -72,7 +68,8 @@ expr_values = {
'desc' : 'No such instance (InstanceID)'}
}
-def try_invalid_gi(name_val, i, field):
+def try_invalid_gi(VSType, name_val, i, field):
+ classname = "%s_VirtualSystemSettingData" % VSType
keys = {}
temp = name_val[i]
name_val[i] = field
@@ -86,37 +83,34 @@ def try_invalid_gi(name_val, i, field):
name_val[i] = temp
return ret_val
-@do_main(sup_types)
+@do_main(platform_sup)
def main():
options = main.options
- if not options.ip:
- parser.print_help()
- return FAIL
-
+ log_param()
status = PASS
-
- destroy_and_undefine_all(options.ip)
- xmlfile = testxml(test_dom )
-
- ret = test_domain_function(xmlfile, options.ip, "define")
+ if options.virt == 'XenFV':
+ VSType = 'Xen'
+ else:
+ VSType = options.virt
+ vsxml = get_class(options.virt)(test_dom)
+ ret = vsxml.define(options.ip)
if not ret :
logger.error("error while define of VS")
return FAIL
global conn
- conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER,
-CIM_PASS), CIM_NS)
+ conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS)
- inst_id = "%s:%s" % (VSType, test_dom)
+ inst_id = "%s:%s" % (VSType, test_dom)
name_val = ['InstanceID', inst_id]
tc_scen = ['INVALID_InstID_Keyname', 'INVALID_InstID_Keyval']
for i in range(len(tc_scen)):
- retval = try_invalid_gi(name_val, i, tc_scen[i])
+ retval = try_invalid_gi(VSType, name_val, i, tc_scen[i])
if retval != PASS:
status = retval
- test_domain_function(test_dom, options.ip, "undefine")
+ vsxml.undefine(options.ip)
return status
if __name__ == "__main__":
16 years, 8 months
[PATCH] [TEST] Adding XenFV and KVM support to 01_enum of VSSD
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1208863320 -19800
# Node ID 9b46a2dcbecd8a7c00a12a667b6530a629c280da
# Parent 1369fdc3f3a9f10207a3b2e1966e6908c1af3fb8
[TEST] Adding XenFV and KVM support to 01_enum of VSSD
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 1369fdc3f3a9 -r 9b46a2dcbecd suites/libvirt-cim/cimtest/VSSD/01_enum.py
--- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Tue Apr 22 15:20:16 2008 +0530
+++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Tue Apr 22 16:52:00 2008 +0530
@@ -28,40 +28,42 @@
import sys
from VirtLib import live
-from VirtLib import utils
from XenKvmLib import enumclass
from XenKvmLib.test_doms import destroy_and_undefine_all
-from XenKvmLib.vxml import XenXML, KVMXML, get_class
-from CimTest.Globals import do_main
-from CimTest.Globals import logger
+from XenKvmLib.vxml import get_class
+from CimTest.Globals import do_main, platform_sup
+from CimTest.Globals import log_param, logger
+from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM']
+test_dom = "VSSD_dom"
-test_dom = "new"
-
-@do_main(sup_types)
+@do_main(platform_sup)
def main():
options = main.options
- status = 0
+ log_param()
+ status = PASS
destroy_and_undefine_all(options.ip)
vsxml = get_class(options.virt)(test_dom)
ret = vsxml.define(options.ip)
if not ret :
logger.error("error while create of VS")
- status = 1
+ status = FAIL
try:
live_cs = live.domain_list(options.ip, options.virt)
key_list = ["InstanceID"]
syslst = enumclass.enumerate(options.ip, \
"VirtualSystemSettingData", \
- key_list, \
- options.virt)
+ key_list, \
+ options.virt)
found = 0
for vssd in syslst :
- instid = "%s:%s" % (options.virt, test_dom)
+ if options.virt == 'XenFV':
+ instid = "%s:%s" % ('Xen', test_dom)
+ else:
+ instid = "%s:%s" % (options.virt, test_dom)
if vssd.InstanceID == instid:
found = 1
break
@@ -69,8 +71,8 @@ def main():
if vssd.ElementName != test_dom:
logger.error("Invalid ElementName- expecting %s, go %s" %
test_dom, vssd.ElementName)
- test_domain_function(test_dom, options.ip, "undefine")
- return 1
+ vsxml.undefine(options.ip)
+ return FAIL
logger.info("Examining VSSD class for the Guest %s" % test_dom)
try:
@@ -81,15 +83,15 @@ def main():
logger.error("Exception %s" % details)
logger.error("Provider reports VSSD `%s', but xm does not" %
vssd.ElementName)
- status = 1
+ status = FAIL
else:
logger.error("Missing VSSD instance for the system %s " % test_dom)
- status = 1
+ status = FAIL
except BaseException, details:
logger.error("Exception %s" % details)
- status = 1
+ status = FAIL
vsxml.undefine(options.ip)
16 years, 8 months
[PATCH] [TEST] Updating 05_reverse_vsmcap.py tc in SettingsDefineCapabilities
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1208857816 -19800
# Node ID 1369fdc3f3a9f10207a3b2e1966e6908c1af3fb8
# Parent cc4b76d02e85e970d3df8c837dbe5722132b568d
[TEST] Updating 05_reverse_vsmcap.py tc in SettingsDefineCapabilities
1) To support KVM and XenFV
2) To adapt to the new infrastructure changes
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r cc4b76d02e85 -r 1369fdc3f3a9 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/05_reverse_vsmcap.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/05_reverse_vsmcap.py Tue Apr 22 15:18:26 2008 +0530
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/05_reverse_vsmcap.py Tue Apr 22 15:20:16 2008 +0530
@@ -20,12 +20,14 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# This tc is used to verify the Classname and InstanceID of
-# Xen_SettingsDefineCapabilities association with Xen_VirtualSystemMigrationCapabilities
+# Xen_SettingsDefineCapabilities association with
+# Xen_VirtualSystemMigrationCapabilities
# Command
# -------
# wbemcli ai -ac Xen_SettingsDefineCapabilities \
# 'http://localhost:5988/root/virt:\
-# Xen_VirtualSystemMigrationCapabilities.InstanceID="MigrationCapabilities"' -nl
+# Xen_VirtualSystemMigrationCapabilities.InstanceID=\
+# "MigrationCapabilities"' -nl
#
#
# Output
@@ -36,32 +38,33 @@
# Date : 05-03-2008
import sys
-from VirtLib import utils
from XenKvmLib import assoc
-from CimTest.Globals import CIM_ERROR_ASSOCIATORS, logger, do_main
+from CimTest.Globals import log_param, CIM_ERROR_ASSOCIATORS, logger
from CimTest.ReturnCodes import PASS, FAIL
-
-sup_types = ['Xen']
+from CimTest.Globals import do_main, platform_sup
+from XenKvmLib.classes import get_typed_class
def print_error(fieldname, ret_value, exp_value):
logger.error("%s Mismatch", fieldname)
logger.error("Returned %s instead of %s", ret_value, exp_value)
-@do_main(sup_types)
+
+@do_main(platform_sup)
def main():
options = main.options
+ log_param()
status = PASS
server = options.ip
- an = 'Xen_SettingsDefineCapabilities'
- cn = 'Xen_VirtualSystemMigrationCapabilities'
- qcn = 'Xen_VirtualSystemMigrationSettingData'
+ an = get_typed_class(options.virt, 'SettingsDefineCapabilities')
+ cn = get_typed_class(options.virt, 'VirtualSystemMigrationCapabilities')
+ qcn = get_typed_class(options.virt, 'VirtualSystemMigrationSettingData')
instid = 'MigrationCapabilities'
-
try:
assoc_info = assoc.Associators(server, \
an, \
cn, \
- InstanceID = instid)
+ InstanceID = instid, \
+ virt = options.virt)
if len(assoc_info) != 1:
logger.error("%s returned %i %s objects", an, len(assoc_info), qcn)
return FAIL
@@ -70,7 +73,8 @@ def main():
print_error('Classname', verify_assoc.classname, qcn)
status = FAIL
if verify_assoc['InstanceID'] != 'MigrationSettingData':
- print_error('InstanceID', verify_assoc['InstanceID'], 'MigrationCapabilities')
+ print_error('InstanceID', verify_assoc['InstanceID'],
+ 'MigrationCapabilities')
status = FAIL
except Exception, detail:
logger.error(CIM_ERROR_ASSOCIATORS, an)
16 years, 8 months
[PATCH] Hang a default VSSD off of the VSMC to mirror the AC RASD behavior
by Dan Smith
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1208796774 25200
# Node ID f4c273a71c71574f4a6315b79433d2003b0a7325
# Parent fa936255dcda9cec48740f87aeeb1b0267378ced
Hang a default VSSD off of the VSMC to mirror the AC RASD behavior
Changes:
- Put a real InstanceID in the VSSD with randomness
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r fa936255dcda -r f4c273a71c71 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Mon Apr 21 08:45:37 2008 -0700
+++ b/src/Virt_SettingsDefineCapabilities.c Mon Apr 21 09:52:54 2008 -0700
@@ -26,6 +26,7 @@
#include <sys/vfs.h>
#include <errno.h>
#include <time.h>
+#include <uuid/uuid.h>
#include <libvirt/libvirt.h>
@@ -55,6 +56,201 @@ const static CMPIBroker *_BROKER;
#define SDC_DISK_INC 250
#define DEFAULT_MAC_PREFIX "00:16:3e"
+
+static bool system_has_vt(virConnectPtr conn)
+{
+ char *caps = NULL;
+ bool vt = false;
+
+ caps = virConnectGetCapabilities(conn);
+ if (caps != NULL)
+ vt = (strstr(caps, "hvm") != NULL);
+
+ free(caps);
+
+ return vt;
+}
+
+static CMPIInstance *default_vssd_instance(const char *prefix,
+ const char *ns)
+{
+ CMPIInstance *inst = NULL;
+ uuid_t uuid;
+ char uuidstr[37];
+ char *iid = NULL;
+
+ uuid_generate(uuid);
+ uuid_unparse(uuid, uuidstr);
+
+ if (asprintf(&iid, "%s:%s", prefix, uuidstr) == -1) {
+ CU_DEBUG("Failed to generate InstanceID string");
+ goto out;
+ }
+
+ inst = get_typed_instance(_BROKER,
+ prefix,
+ "VirtualSystemSettingData",
+ ns);
+ if (inst == NULL) {
+ CU_DEBUG("Failed to create default VSSD instance");
+ goto out;
+ }
+
+ CMSetProperty(inst, "InstanceID",
+ (CMPIValue *)iid, CMPI_chars);
+
+ out:
+ free(iid);
+
+ return inst;
+}
+
+static CMPIInstance *_xen_base_vssd(virConnectPtr conn,
+ const char *ns,
+ const char *name)
+{
+ CMPIInstance *inst;
+
+ inst = default_vssd_instance(pfx_from_conn(conn), ns);
+ if (inst == NULL)
+ return NULL;
+
+ CMSetProperty(inst, "VirtualSystemIdentifier",
+ (CMPIValue *)name, CMPI_chars);
+
+ return inst;
+}
+
+static CMPIStatus _xen_vsmc_to_vssd(virConnectPtr conn,
+ const char *ns,
+ struct inst_list *list)
+{
+ CMPIStatus s = {CMPI_RC_OK, NULL};
+ CMPIInstance *inst;
+ int isfv = 0;
+
+ inst = _xen_base_vssd(conn, ns, "Xen_Paravirt_Guest");
+ if (inst == NULL)
+ goto error;
+
+ CMSetProperty(inst, "Bootloader",
+ (CMPIValue *)"/usr/bin/pygrub", CMPI_chars);
+
+ CMSetProperty(inst, "isFullVirt",
+ (CMPIValue *)&isfv, CMPI_boolean);
+
+ inst_list_add(list, inst);
+
+ if (system_has_vt(conn)) {
+ isfv = 1;
+
+ inst = _xen_base_vssd(conn, ns, "Xen_Fullvirt_Guest");
+ if (inst == NULL)
+ goto error;
+
+ CMSetProperty(inst, "BootDevice",
+ (CMPIValue *)"hda", CMPI_chars);
+
+ CMSetProperty(inst, "isFullVirt",
+ (CMPIValue *)&isfv, CMPI_boolean);
+
+ inst_list_add(list, inst);
+ }
+
+ return s;
+
+ error:
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create %s_VSSD instance",
+ pfx_from_conn(conn));
+
+ return s;
+}
+
+static CMPIStatus _kvm_vsmc_to_vssd(virConnectPtr conn,
+ const char *ns,
+ struct inst_list *list)
+{
+ CMPIStatus s = {CMPI_RC_OK, NULL};
+ CMPIInstance *inst;
+
+ inst = default_vssd_instance(pfx_from_conn(conn), ns);
+ if (inst == NULL) {
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create %s_VSSD instance",
+ pfx_from_conn(conn));
+ goto out;
+ }
+
+ CMSetProperty(inst, "VirtualSystemIdentifier",
+ (CMPIValue *)"KVM_guest", CMPI_chars);
+
+ CMSetProperty(inst, "BootDevice",
+ (CMPIValue *)"hda", CMPI_chars);
+
+ inst_list_add(list, inst);
+ out:
+ return s;
+}
+
+static CMPIStatus _lxc_vsmc_to_vssd(virConnectPtr conn,
+ const char *ns,
+ struct inst_list *list)
+{
+ CMPIStatus s = {CMPI_RC_OK, NULL};
+ CMPIInstance *inst;
+
+ inst = default_vssd_instance(pfx_from_conn(conn), ns);
+ if (inst == NULL) {
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create %s_VSSD instance",
+ pfx_from_conn(conn));
+ goto out;
+ }
+
+ CMSetProperty(inst, "InitPath",
+ (CMPIValue *)"/sbin/init", CMPI_chars);
+
+ inst_list_add(list, inst);
+ out:
+ return s;
+}
+
+static CMPIStatus vsmc_to_vssd(const CMPIObjectPath *ref,
+ struct std_assoc_info *info,
+ struct inst_list *list)
+{
+ CMPIStatus s;
+ virConnectPtr conn = NULL;
+ const char *cn;
+ const char *ns;
+
+ cn = CLASSNAME(ref);
+ ns = NAMESPACE(ref);
+
+ conn = connect_by_classname(_BROKER, cn, &s);
+ if (conn == NULL)
+ goto out;
+
+ if (STARTS_WITH(cn, "Xen"))
+ s = _xen_vsmc_to_vssd(conn, ns, list);
+ else if (STARTS_WITH(cn, "KVM"))
+ s = _kvm_vsmc_to_vssd(conn, ns, list);
+ else if (STARTS_WITH(cn, "LXC"))
+ s = _lxc_vsmc_to_vssd(conn, ns, list);
+ else
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Invalid reference");
+
+ out:
+ virConnectClose(conn);
+
+ return s;
+}
static bool rasd_prop_copy_value(struct sdc_rasd_prop src,
struct sdc_rasd_prop *dest)
@@ -1009,11 +1205,39 @@ static struct std_assoc _vsmsd_to_migrat
.make_ref = make_ref
};
+static char *vsmc[] = {
+ "Xen_VirtualSystemManagementCapabilities",
+ "KVM_VirtualSystemManagementCapabilities",
+ "LXC_VirtualSystemManagementCapabilities",
+ NULL
+};
+
+static char *vssd[] = {
+ "Xen_VirtualSystemSettingData",
+ "KVM_VirtualSystemSettingData",
+ "LXC_VirtualSystemSettingData",
+ NULL
+};
+
+static struct std_assoc _vsmc_to_vssd = {
+ .source_class = (char**)&vsmc,
+ .source_prop = "GroupComponent",
+
+ .target_class = (char**)&vssd,
+ .target_prop = "PartComponent",
+
+ .assoc_class = (char**)&assoc_classname,
+
+ .handler = vsmc_to_vssd,
+ .make_ref = make_ref
+};
+
static struct std_assoc *assoc_handlers[] = {
&_alloc_cap_to_rasd,
&_rasd_to_alloc_cap,
&_migrate_cap_to_vsmsd,
&_vsmsd_to_migrate_cap,
+ &_vsmc_to_vssd,
NULL
};
16 years, 8 months
[PATCH] [TEST] Updating the 03_forward_errs.py tc in SettingsDefineCapabilities
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1208857588 -19800
# Node ID dcfad1d986ec429fd63475ecd53382117e55ad72
# Parent 320328bb0f70196ea52e6c0e9e254c681cfb5d60
[TEST] Updating the 03_forward_errs.py tc in SettingsDefineCapabilities
1) To support KVM and XenFV
2) To adapt to the new infrastructure changes
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 320328bb0f70 -r dcfad1d986ec suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Tue Apr 22 15:14:54 2008 +0530
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Tue Apr 22 15:16:28 2008 +0530
@@ -16,7 +16,7 @@
# General Public License for more details.
#
# You should have received a copy of the GNU General Public
-# License along with this library; if not, write to the Free Software
+# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# This tc is used to verify if appropriate exceptions are
@@ -28,26 +28,24 @@
import sys
import pywbem
-from VirtLib import utils
from CimTest.ReturnCodes import PASS
from XenKvmLib.common_util import try_assoc
from XenKvmLib import assoc
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
-from CimTest.Globals import do_main
-
-sup_types = ['Xen']
+from CimTest.Globals import do_main, platform_sup
+from XenKvmLib.classes import get_typed_class
expr_values = {
- "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, \
- 'desc' : '"Missing InstanceID' }, \
- "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, \
- 'desc' : 'Unable to determine resource type' },
+ "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED,
+ 'desc' : 'CIM_ERR_FAILED: Missing InstanceID'},
+ "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED,
+ 'desc' : 'CIM_ERR_FAILED: Unable to determine\
+ resource type' },
"invalid_ccname_keyname" : { 'rc' : pywbem.CIM_ERR_INVALID_PARAMETER,
- 'desc' : 'One or more parameter values passed \
-to the method were invalid' }
+ 'desc' : 'CIM_ERR_INVALID_PARAMETER' }
}
-def err_invalid_instid_keyname(conn, field):
+def err_invalid_instid_keyname(virt, conn, field):
# Input:
# ------
# wbemcli ai -ac Xen_SettingsDefineCapabilities \
@@ -59,14 +57,14 @@ def err_invalid_instid_keyname(conn, fie
# error code : CIM_ERR_FAILED
# error desc : "Missing InstanceID"
#
- assoc_classname = 'Xen_SettingsDefineCapabilities'
- classname = 'Xen_AllocationCapabilities'
+ assoc_classname = get_typed_class(virt, "SettingsDefineCapabilities")
+ classname = get_typed_class(virt, "AllocationCapabilities")
keys = { field : 'MemoryPool/0' }
return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \
expr_values=expr_values['invalid_instid_keyname'],
bug_no="")
-def err_invalid_instid_keyvalue(conn, field):
+def err_invalid_instid_keyvalue(virt, conn, field):
# Input:
# ------
# wbemcli ai -ac Xen_SettingsDefineCapabilities \
@@ -78,14 +76,14 @@ def err_invalid_instid_keyvalue(conn, fi
# Verify for the error
# error code : CIM_ERR_FAILED
# error desc : "Unable to determine resource type"
- assoc_classname = 'Xen_SettingsDefineCapabilities'
- classname = 'Xen_AllocationCapabilities'
+ assoc_classname = get_typed_class(virt, "SettingsDefineCapabilities")
+ classname = get_typed_class(virt, "AllocationCapabilities")
keys = { 'InstanceID' : field }
return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \
expr_values=expr_values['invalid_instid_keyvalue'],
bug_no="")
-def err_invalid_ccname_keyname(conn, field):
+def err_invalid_ccname_keyname(virt, conn, field):
# Input:
# ------
# wbemcli ai -ac Xen_SettingsDefineCapabilities \
@@ -95,33 +93,34 @@ def err_invalid_ccname_keyname(conn, fie
# -------
# error code : CIM_ERR_INVALID_PARAMETER
# error desc : One or more parameter values passed to the method were invalid
- assoc_classname = 'Xen_SettingsDefineCapabilities'
+ assoc_classname = get_typed_class(virt, "SettingsDefineCapabilities")
classname = field
keys = { 'InstanceID' : 'MemoryPool/0' }
return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \
expr_values=expr_values['invalid_ccname_keyname'],
bug_no="")
-@do_main(sup_types)
+@do_main(platform_sup)
def main():
options = main.options
- status = PASS
+ virt = options.virt
conn = assoc.myWBEMConnection('http://%s' % options.ip,
(CIM_USER, CIM_PASS), CIM_NS)
- ret_value = err_invalid_instid_keyname(conn, field='INVALID_InstID_KeyName')
+ ret_value = err_invalid_instid_keyname(virt, conn,
+ field='INVALID_InstID_KeyName')
if ret_value != PASS:
logger.error("------ FAILED: Invalid InstanceID Key Name.------")
- status = ret_value
- ret_value = err_invalid_instid_keyvalue(conn,
+ return ret_value
+ ret_value = err_invalid_instid_keyvalue(virt, conn,
field='INVALID_InstID_KeyValue')
if ret_value != PASS:
logger.error("------ FAILED: Invalid InstanceID Key Value.------")
- status = ret_value
- ret_value = err_invalid_ccname_keyname(conn, field='WrongClassName')
+ return ret_value
+ ret_value = err_invalid_ccname_keyname(virt, conn, field='WrongClassName')
if ret_value != PASS:
logger.error("------ FAILED: Invalid CCName Key Name.------")
- status = ret_value
- return status
+ return ret_value
+ return PASS
if __name__ == "__main__":
sys.exit(main())
16 years, 8 months
[PATCH] [TEST] Move the global provider version info into libvirt-cim suite
by zli@linux.vnet.ibm.com
# HG changeset patch
# User Zhengang Li <lizg(a)cn.ibm.com>
# Date 1208848869 -28800
# Node ID 84009d4d2ed87240fd82c694d398df3b6bf91bed
# Parent 41a6c5cd50733a67d56d6612dad02705377a8b88
[TEST] Move the global provider version info into libvirt-cim suite
Move the CIM_REV & CIM_SET from Cimtest.Globals.py to XenKvmLib.const.py
Most possible reference of CIM_REV will be numeric comparing against
an expected revision for an older or newer result. I change the CIM_REV
to an integer type. CIM_SET is a hexadecimal number, and doesn't have
such incremental features across the changesets. I left it as a string.
Signed-off-by: Zhengang Li <lizg(a)cn.ibm.com>
diff -r 41a6c5cd5073 -r 84009d4d2ed8 lib/CimTest/Globals.py
--- a/lib/CimTest/Globals.py Mon Apr 21 16:55:52 2008 +0800
+++ b/lib/CimTest/Globals.py Tue Apr 22 15:21:09 2008 +0800
@@ -34,8 +34,6 @@ global platform_sup
global platform_sup
global CIM_IP
global CIM_PORT
-global CIM_REV
-global CIM_SET
global CIM_ERROR_ASSOCIATORNAMES
global CIM_ERROR_ENUMERATE
@@ -49,8 +47,6 @@ CIM_FUUID = os.getenv("CIM_FUUID")
CIM_FUUID = os.getenv("CIM_FUUID")
CIM_TC = os.getenv("CIM_TC")
CIM_IP = os.getenv("CIM_IP")
-CIM_REV = os.getenv("CIM_REV")
-CIM_SET = os.getenv("CIM_SET")
CIM_PORT = "5988"
NM = "TEST LOG"
platform_sup = ["Xen", "KVM", "XenFV"]
@@ -91,8 +87,6 @@ if not CIM_IP:
if not CIM_IP:
CIM_IP = "localhost"
-if not CIM_REV or not CIM_SET:
- CIM_REV = CIM_SET = "Unknown"
def log_param(debug=None):
#FIXME debug=None is a temporary work around to avoid duplicate
diff -r 41a6c5cd5073 -r 84009d4d2ed8 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Mon Apr 21 16:55:52 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Apr 22 15:21:09 2008 +0800
@@ -22,6 +22,16 @@ import platform
import platform
from VirtLib.live import fv_cap
from CimTest.Globals import CIM_IP
+
+global CIM_REV
+global CIM_SET
+
+CIM_REV = int(os.getenv("CIM_REV"))
+CIM_SET = os.getenv("CIM_SET")
+
+if not CIM_REV or not CIM_SET:
+ CIM_REV = 0
+ CIM_SET = 'Unknown'
# vxml.NetXML
default_bridge_name = 'testbridge'
diff -r 41a6c5cd5073 -r 84009d4d2ed8 suites/libvirt-cim/main.py
--- a/suites/libvirt-cim/main.py Mon Apr 21 16:55:52 2008 +0800
+++ b/suites/libvirt-cim/main.py Tue Apr 22 15:21:09 2008 +0800
@@ -92,7 +92,7 @@ def get_version(virt, ip):
revision = inst[0]['Revision']
changeset = inst[0]['Changeset']
except Exception:
- return 'Unknown', 'Unknown'
+ return '0', 'Unknown'
return revision, changeset
def main():
16 years, 8 months
[PATCH] [RFC] Reorder providers in Mafefile.am
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1208544564 25200
# Node ID 4be8cc519dc8829c90f7bacc335933442f29d9ec
# Parent 1904e4f08af21f99af698e42da236cf39407c5e2
[RFC] Reorder providers in Mafefile.am.
Currently, the Virt_VSMigrationCapabilities library is not being installed properly.
/usr/bin/ld: cannot find -lVirt_VSMigrationCapabilities^M
collect2: ld returned 1 exit status^M
libtool: install: error: relink `libVirt_SettingsDefineCapabilities.la' with the above command before installing it
During the install, libtool has to relink libraries once they are in the install location. Here, libtool attempts relink the library before the dependant libraries are installed.
This change reorders things so that class libraries are listed first in the list and association libraries are listed at the end. Also, the class libraries are reordered so that those libraries with dependancies are listed after the libraries they are dependant on.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 1904e4f08af2 -r 4be8cc519dc8 src/Makefile.am
--- a/src/Makefile.am Thu Apr 17 13:37:29 2008 -0700
+++ b/src/Makefile.am Fri Apr 18 11:49:24 2008 -0700
@@ -30,39 +30,41 @@
providerdir = $(PROVIDERDIR)
+# When adding new provider libraries, be sure place it in the list
+# after any dependant libraries.
provider_LTLIBRARIES = libVirt_ComputerSystem.la \
libVirt_Device.la \
+ libVirt_RASD.la \
+ libVirt_HostSystem.la \
+ libVirt_VSSD.la \
+ libVirt_EnabledLogicalElementCapabilities.la \
+ libVirt_DevicePool.la \
+ libVirt_RegisteredProfile.la \
+ libVirt_VSMigrationCapabilities.la \
+ libVirt_VSMigrationSettingData.la \
+ libVirt_VirtualSystemSnapshotServiceCapabilities.la \
libVirt_SystemDevice.la \
libVirt_ComputerSystemIndication.la \
libVirt_ComputerSystemMigrationIndication.la \
- libVirt_RASD.la \
- libVirt_HostSystem.la \
+ libVirt_VirtualSystemManagementCapabilities.la \
+ libVirt_AllocationCapabilities.la \
+ libVirt_ReferencedProfile.la \
+ libVirt_VirtualSystemSnapshotService.la \
libVirt_VirtualSystemManagementService.la \
- libVirt_VirtualSystemManagementCapabilities.la \
- libVirt_EnabledLogicalElementCapabilities.la \
- libVirt_DevicePool.la \
- libVirt_AllocationCapabilities.la \
- libVirt_VSSD.la \
+ libVirt_ResourcePoolConfigurationService.la \
+ libVirt_ResourcePoolConfigurationCapabilities.la \
+ libVirt_VSMigrationService.la \
+ libVirt_SettingsDefineCapabilities.la \
libVirt_HostedDependency.la \
- libVirt_RegisteredProfile.la \
libVirt_ElementConformsToProfile.la \
- libVirt_ReferencedProfile.la \
- libVirt_SettingsDefineCapabilities.la \
libVirt_HostedResourcePool.la \
libVirt_ElementCapabilities.la \
- libVirt_ResourcePoolConfigurationService.la \
- libVirt_ResourcePoolConfigurationCapabilities.la \
libVirt_VSSDComponent.la \
libVirt_SettingsDefineState.la \
libVirt_ResourceAllocationFromPool.la \
libVirt_ElementAllocatedFromPool.la \
libVirt_HostedService.la \
- libVirt_ElementSettingData.la \
- libVirt_VSMigrationCapabilities.la \
- libVirt_VSMigrationSettingData.la \
- libVirt_VirtualSystemSnapshotService.la \
- libVirt_VSMigrationService.la \
- libVirt_VirtualSystemSnapshotServiceCapabilities.la
+ libVirt_ElementSettingData.la
libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c
libVirt_Device_la_SOURCES = Virt_Device.c
16 years, 8 months