[PATCH] [TEST] Updating 01_enum_crs.py of RedirectionService
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com>
# Date 1225474164 25200
# Node ID e3bfd8360898b9b7a940d170667638c487793883
# Parent d1614c101c281b57bd2bc98dfb6625f790748e54
[TEST] Updating 01_enum_crs.py of RedirectionService .
Updating 01_enum_crs.py to use appropriate 'MaxConcurrentEnabledSAPs' depending on the
revision of provider < 723
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r d1614c101c28 -r e3bfd8360898 suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py
--- a/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Wed Oct 29 20:11:47 2008 -0700
+++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Fri Oct 31 10:29:24 2008 -0700
@@ -26,17 +26,19 @@
#
import sys
-from VirtLib.live import domain_list
+from sets import Set
+from XenKvmLib.xm_virt_util import domain_list, active_domain_list
from XenKvmLib.enumclass import EnumInstances
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
from XenKvmLib.classes import get_typed_class
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
from XenKvmLib.common_util import get_host_info
+from XenKvmLib.const import get_provider_version
SHAREMODE = 3
REDIRECTION_SER_TYPE = 3
-MAX_SAP_SESSIONS = 65535
+CRS_MAX_SAP_REV = 723
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@do_main(sup_types)
@@ -50,6 +52,19 @@
cname = 'ConsoleRedirectionService'
classname = get_typed_class(virt, cname)
+
+ cim_rev, changeset = get_provider_version(virt, server)
+ # This branch should be removed once the F9 rpm has changes with
+ # Revision >= 723, and max_sap_sessions = 65535 should be used
+ # for verification.
+ if cim_rev < CRS_MAX_SAP_REV:
+ inactive_active_doms = domain_list(server, virt)
+ active_doms = active_domain_list(server, virt)
+ inactive_doms = len(Set(inactive_active_doms) - Set(active_doms))
+ max_sap_sessions = 2 * inactive_doms
+ else:
+ max_sap_sessions = 65535
+
crs_list = {
'ElementName' : cname,
'SystemCreationClassName' : host_cn,
@@ -61,7 +76,7 @@
'EnabledState' : 2,
'EnabledDefault' : 2,
'RequestedState' : 12,
- 'MaxConcurrentEnabledSAPs': MAX_SAP_SESSIONS
+ 'MaxConcurrentEnabledSAPs': max_sap_sessions
}
try:
16 years, 1 month
KVM on Pegasus Test Run Summary for Oct 31 2008 [ with F9 rpm ]
by Deepti B Kalakeri
=================================================
KVM on Pegasus Test Run Summary for Oct 31 2008
=================================================
Distro: Fedora release 9 (Sulphur)
Kernel: 2.6.25.14-108.fc9.x86_64
libvirt: 0.4.4
Hypervisor: QEMU 0.9.1
CIMOM: Pegasus 2.7.0
Libvirt-cim revision: 712
Libvirt-cim changeset: 668097d4b27c
=================================================
FAIL : 3
XFAIL : 2
SKIP : 6
PASS : 127
-----------------
Total : 138
=================================================
FAIL Test Summary:
RedirectionService - 01_enum_crs.py: FAIL
SystemDevice - 01_forward.py: FAIL
VirtualSystemManagementService - 14_define_sys_disk.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.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
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
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: XFAIL
ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation Failed')
ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange()
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation Failed')
ERROR - Unable to 'Reboot' dom 'test_domain' using RequestedStateChange()
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
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: PASS
--------------------------------------------------------------------
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
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: FAIL
ERROR - 'MaxConcurrentEnabledSAPs' Mismatch
ERROR - Expected '65535', Got '2'
CIM_ERR_INVALID_CLASS: Linux_ComputerSystem
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.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: FAIL
ERROR - NameError : name 'KVM_NetworkPort' is not defined
Traceback (most recent call last):
File "./lib/XenKvmLib/const.py", line 116, in do_try
File "01_forward.py", line 92, in main
device = devices.device_of(options.ip, key_list)
File "./lib/XenKvmLib/devices.py", line 48, in device_of
File "<string>", line 1, in <module>
NameError: name 'KVM_NetworkPort' is not defined
ERROR - None
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: 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
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: FAIL
ERROR - Unexpected rc code 1 and description:
CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD
ERROR - Unable to define rstest_disk_domain
InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD
--------------------------------------------------------------------
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: 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
--------------------------------------------------------------------
Thanks and Regards,
Deepti.
16 years, 1 month
[PATCH] [TEST] Delete the functions have been removed to xm_virt_util.py and update common_util.py
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1225344599 25200
# Node ID 2c9e9038145f1177e5e61258ea44da9c61dc1647
# Parent 408dbb3a61b43bd0def587a9ea7e648105def002
[TEST] Delete the functions have been removed to xm_virt_util.py and update common_util.py
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 408dbb3a61b4 -r 2c9e9038145f lib/VirtLib/live.py
--- a/lib/VirtLib/live.py Mon Oct 27 20:03:31 2008 -0700
+++ b/lib/VirtLib/live.py Wed Oct 29 22:29:59 2008 -0700
@@ -112,50 +112,6 @@
return out.splitlines()
-def xm_domname(ip, domid):
-
- cmd = "xm domname %s" % domid
-
- rc, out = utils.run_remote(ip, cmd)
- if rc != 0:
- return None
-
- return out
-
-def list_guests_on_bridge(ip, bridge):
- """Returns a list of domU names that have vifs in the
- specified bridge.
- """
-
- cmd = "brctl show %s | grep 'vif' | grep -v vif0.*" % bridge
-
- rc, out = utils.run_remote(ip, cmd)
- if rc != 0:
- return []
-
- ret = []
- lines = out.splitlines()
- for l in lines:
- vif = l.split()[-1]
- domid = vif.replace('vif', '').split('.')[0]
- domname = xm_domname(ip, domid)
- if domname != None:
- ret.append(domname)
-
- return ret
-
-def disk_list(ip, vs_name):
- """Returns the list of disk of the specified VS
- """
-
- guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' "
- rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd)
-
- if rc != 0:
- return None
-
- return out
-
def create_disk_file(ip, size, diskfile) :
"""Creates a disk file 1MB block-size ,and if succsess returns disk created.
"""
@@ -181,74 +137,6 @@
return int(mfm)
-def domain_list(server, virt="Xen"):
- """Function to list all domains"""
- if virt == "XenFV":
- virt = "Xen"
-
- cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \
- utils.virt2uri(virt)
- ret, out = utils.run_remote(server, cmd)
-
- if ret != 0:
- return None
- names = []
- lines = out.split("\n")
- for line in lines:
- dinfo = line.split()
- if len(dinfo) > 1:
- names.append(dinfo[1])
-
- return names
-
-def active_domain_list(server, virt="Xen"):
- """Function to list all active domains"""
- if virt == "XenFV":
- virt = "Xen"
-
- cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \
- utils.virt2uri(virt)
- ret, out = utils.run_remote(server, cmd)
-
- if ret != 0:
- return None
- names = []
- lines = out.split("\n")
- for line in lines:
- dinfo = line.split()
- if len(dinfo) > 1:
- names.append(dinfo[1])
-
- return names
-
-def bootloader(server, gtype = 0):
- """
- Function to find the bootloader to be used.
- It uses the following steps to determine the bootloader.
- 1) The function checks if the machine is full virt or para virt.
- 2) Checks if a Full virt guest option is set
- NOTE : gtype = 1 for FV and gtype = 0 for PV
- i) If yes, then verifies if the machine has the support to
- create the full virt guest. If both options are true then
- bootloader is set to 'hvmloader'
- ii) Otherwise, a paravirt guest creation is requested.
- a) Verfies the OS on which it is running is Red hat/Fedora/SLES.
- b) sets the bootloader to pygrub for Red hat/Fedora
- or domUloader.py for SLES.
- 3) returns the bootloader.
- """
- if fv_cap(server) and gtype == 1:
- bootloader = "/usr/lib/xen/boot/hvmloader"
- else:
- cmd = "cat /etc/issue | grep -v ^$ | egrep 'Red Hat|Fedora'"
- ret, out = utils.run_remote(server,cmd)
- if ret != 0:
- # For SLES
- bootloader = "/usr/lib/xen/boot/domUloader.py"
- else:
- # For Red Hat or Fedora
- bootloader = "/usr/bin/pygrub"
- return bootloader
def fv_cap(server):
cmd = "egrep flags /proc/cpuinfo | uniq | egrep 'vmx|svm'"
@@ -270,87 +158,3 @@
return socket.gethostbyaddr(socket.gethostname())[0]
-
-def net_list(server, virt="Xen"):
- """Function to list active network"""
- names = []
- cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \
- utils.virt2uri(virt)
- ret, out = utils.run_remote(server, cmd)
-
- if ret != 0:
- return names
- lines = out.split("\n")
- for line in lines:
- virt_network = line.split()
- if len(virt_network) >= 1 and virt_network[1] == "active":
- names.append(virt_network[0])
-
- return names
-
-def get_bridge_from_network_xml(network, server, virt="Xen"):
- """Function returns bridge name for a given virtual network"""
-
- cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \
- (utils.virt2uri(virt), network)
- ret, out = utils.run_remote(server, cmd)
-
- if ret != 0:
- return None
- bridge = out.split("'")
- if len(bridge) > 1:
- return bridge[1]
-
-def network_by_bridge(bridge, server, virt="Xen"):
- """Function returns virtual network for a given bridge"""
-
- networks = net_list(server, virt)
- if len(networks) == 0:
- return None
-
- for network in networks:
- if bridge == get_bridge_from_network_xml(network, server, virt):
- return network
-
- return None
-
-def virsh_version(server, virt="KVM"):
- cmd = "virsh -c %s -v " % utils.virt2uri(virt)
- ret, out = utils.run_remote(server, cmd)
- if ret != 0:
- return None
- return out
-
-def diskpool_list(server, virt="KVM"):
- """Function to list active DiskPool list"""
- names = []
- cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \
- utils.virt2uri(virt)
- ret, out = utils.run_remote(server, cmd)
-
- if ret != 0:
- return names
-
- lines = out.split("\n")
- for line in lines:
- disk_pool = line.split()
- if len(disk_pool) >= 1 and disk_pool[1] == "active":
- names.append(disk_pool[0])
-
- return names
-
-def virsh_vcpuinfo(server, dom, virt="Xen"):
- cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt),
- dom)
- ret, out = utils.run_remote(server, cmd)
- if out.isdigit():
- return out
- return None
-
-def get_hv_ver(server, virt="Xen"):
- cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt)
- ret, out = utils.run_remote(server, cmd)
- if ret == 0:
- return out
- else:
- return None
diff -r 408dbb3a61b4 -r 2c9e9038145f suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Oct 29 22:29:59 2008 -0700
@@ -36,7 +36,7 @@
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, \
CIM_ERROR_GETINSTANCE
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
-from VirtLib.live import diskpool_list, virsh_version, net_list, domain_list
+from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list, domain_list
from XenKvmLib.vxml import PoolXML, NetXML
from VirtLib import utils
from XenKvmLib.const import default_pool_name, default_network_name
16 years, 1 month
make postinstall error
by Deepti B Kalakeri
Hi,
I see the following postinstall error:
Parsing error: parse error: Error adding class
Xen_ResourceAllocationSettingData to the repository:
CIM_ERR_CLASS_HAS_CHILDREN: Xen_ResourceAllocationSettingData
Here is the description and the probable solution for it:
CIM_ERR_CLASS_HAS_CHILDREN
*Description: *
This error message uses one parameter, {0}, which is replaced by the
class name.
*Cause: *
This exception is thrown by the CIMOM to disallow invalidation of the
subclasses by a superclass deletion.
Clients must explicitly delete the subclasses first. The check for
subclasses is made before the check for class instances.
*Solution: *
Remove the subclasses of the given class.
Here is the list of RASD related classes and subclasses.
wbemcli ecn http://u:p@localhost/root/virt | grep
ResourceAllocationSettingData
localhost:5988/root/virt:LXC_InputResourceAllocationSettingData
localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData
localhost:5988/root/virt:LXC_GraphicsResourceAllocationSettingData
localhost:5988/root/virt:Xen_GraphicsResourceAllocationSettingData
localhost:5988/root/virt:Xen_InputResourceAllocationSettingData
localhost:5988/root/virt:CIM_ResourceAllocationSettingData
localhost:5988/root/virt:KVM_ResourceAllocationSettingData
localhost:5988/root/virt:KVM_InputResourceAllocationSettingData
localhost:5988/root/virt:LXC_ResourceAllocationSettingData
localhost:5988/root/virt:Xen_ResourceAllocationSettingData
I tried modifying the mof file, Makefile but nothing worked.
I also made sure there were no RASD subclasses like DiskRASD and alike
before postinstall as suggested above, but nothing worked.
Can you suggest how and why we could be facing this error.
Thanks and Regards,
Deepti.
16 years, 1 month
[PATCH] Add support for graphics device to Virt_RASD.c
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1224705263 25200
# Node ID 8b08dc1aa0f1cab258bc23e7f80e210761be187d
# Parent 52bef91a7296c176c1dcd732a25ea1c9146773ff
Add support for graphics device to Virt_RASD.c
Also add field for a hostname / IP address to the graphics struct. This field
is for storing the console's listen address. This will allow the user to
set a specific address to listen on, in addition to a specific port.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 52bef91a7296 -r 8b08dc1aa0f1 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Wed Oct 22 09:24:16 2008 -0700
+++ b/libxkutil/device_parsing.c Wed Oct 22 12:54:23 2008 -0700
@@ -76,6 +76,7 @@
{
free(dev->type);
free(dev->port);
+ free(dev->host);
}
static void cleanup_input_device(struct input_device *dev)
@@ -447,9 +448,13 @@
gdev->type = get_attr_value(node, "type");
gdev->port = get_attr_value(node, "port");
+ gdev->host = get_attr_value(node, "listen");
if ((gdev->type == NULL) || (gdev->port == NULL))
goto err;
+
+ if (gdev->host == NULL)
+ gdev->host = strdup("127.0.0.1");
vdev->type = CIM_RES_TYPE_GRAPHICS;
vdev->id = strdup("graphics");
@@ -665,6 +670,7 @@
} else if (dev->type == CIM_RES_TYPE_GRAPHICS) {
DUP_FIELD(dev, _dev, dev.graphics.type);
DUP_FIELD(dev, _dev, dev.graphics.port);
+ DUP_FIELD(dev, _dev, dev.graphics.host);
} else if (dev->type == CIM_RES_TYPE_INPUT) {
DUP_FIELD(dev, _dev, dev.input.type);
DUP_FIELD(dev, _dev, dev.input.bus);
diff -r 52bef91a7296 -r 8b08dc1aa0f1 libxkutil/device_parsing.h
--- a/libxkutil/device_parsing.h Wed Oct 22 09:24:16 2008 -0700
+++ b/libxkutil/device_parsing.h Wed Oct 22 12:54:23 2008 -0700
@@ -62,6 +62,7 @@
struct graphics_device {
char *type;
char *port;
+ char *host;
};
struct input_device {
diff -r 52bef91a7296 -r 8b08dc1aa0f1 schema/ResourceAllocationSettingData.mof
--- a/schema/ResourceAllocationSettingData.mof Wed Oct 22 09:24:16 2008 -0700
+++ b/schema/ResourceAllocationSettingData.mof Wed Oct 22 12:54:23 2008 -0700
@@ -115,3 +115,25 @@
class LXC_MemResourceAllocationSettingData : LXC_ResourceAllocationSettingData
{
};
+
+[Description ("Xen virtual graphics device"),
+ Provider("cmpi::Virt_RASD")
+]
+class Xen_GraphicsResourceAllocationSettingData : Xen_ResourceAllocationSettingData
+{
+};
+
+[Description ("KVM virtual graphics device"),
+ Provider("cmpi::Virt_RASD")
+]
+class KVM_GraphicsResourceAllocationSettingData : KVM_ResourceAllocationSettingData
+{
+};
+
+[Description ("LXC virtual graphics device"),
+ Provider("cmpi::Virt_RASD")
+]
+class LXC_GraphicsResourceAllocationSettingData : LXC_ResourceAllocationSettingData
+{
+};
+
diff -r 52bef91a7296 -r 8b08dc1aa0f1 schema/ResourceAllocationSettingData.registration
--- a/schema/ResourceAllocationSettingData.registration Wed Oct 22 09:24:16 2008 -0700
+++ b/schema/ResourceAllocationSettingData.registration Wed Oct 22 12:54:23 2008 -0700
@@ -4,10 +4,13 @@
Xen_NetResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
Xen_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
Xen_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
+Xen_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
KVM_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
KVM_NetResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
KVM_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
KVM_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
+KVM_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
LXC_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
LXC_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
LXC_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
+LXC_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance
diff -r 52bef91a7296 -r 8b08dc1aa0f1 src/Virt_RASD.c
--- a/src/Virt_RASD.c Wed Oct 22 09:24:16 2008 -0700
+++ b/src/Virt_RASD.c Wed Oct 22 12:54:23 2008 -0700
@@ -247,6 +247,29 @@
return s;
}
+static CMPIStatus set_graphics_rasd_params(const struct virt_device *dev,
+ CMPIInstance *inst)
+{
+ int rc;
+ char *addr_str = NULL;
+ CMPIStatus s = {CMPI_RC_OK, NULL};
+
+ rc = asprintf(&addr_str,
+ "%s:%s",
+ dev->dev.graphics.host,
+ dev->dev.graphics.port);
+ if (rc == -1) {
+ goto out;
+ }
+
+ CMSetProperty(inst, "Address", (CMPIValue *)addr_str, CMPI_chars);
+
+ out:
+ free(addr_str);
+
+ return s;
+}
+
static CMPIInstance *rasd_from_vdev(const CMPIBroker *broker,
struct virt_device *dev,
const char *host,
@@ -272,6 +295,9 @@
} else if (dev->type == CIM_RES_TYPE_MEM) {
type = CIM_RES_TYPE_MEM;
base = "MemResourceAllocationSettingData";
+ } else if (dev->type == CIM_RES_TYPE_GRAPHICS) {
+ type = CIM_RES_TYPE_GRAPHICS;
+ base = "GraphicsResourceAllocationSettingData";
} else {
return NULL;
}
@@ -320,6 +346,8 @@
(CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64);
} else if (dev->type == CIM_RES_TYPE_PROC) {
set_proc_rasd_params(broker, ref, dev, host, inst);
+ } else if (dev->type == CIM_RES_TYPE_GRAPHICS) {
+ s = set_graphics_rasd_params(dev, inst);
}
/* FIXME: Put the HostResource in place */
@@ -441,6 +469,8 @@
*type = CIM_RES_TYPE_PROC;
else if (STREQ(base, "MemResourceAllocationSettingData"))
*type = CIM_RES_TYPE_MEM;
+ else if (STREQ(base, "GraphicsResourceAllocationSettingData"))
+ *type = CIM_RES_TYPE_GRAPHICS;
else
goto out;
@@ -468,6 +498,9 @@
break;
case CIM_RES_TYPE_DISK:
*classname = "DiskResourceAllocationSettingData";
+ break;
+ case CIM_RES_TYPE_GRAPHICS:
+ *classname = "GraphicsResourceAllocationSettingData";
break;
default:
rc = CMPI_RC_ERR_FAILED;
16 years, 1 month
Documents about CIM structure
by Toshifumi Fujimura
Hi,
I'm researching the CIM's structure of classes.
Would you have something documents of it?
(ex. class tree..)
Works for me.
--
Toshifumi Fujimura.
16 years, 1 month