[PATCH] [TEST] Update RedirectionSerivce 01 to work with recent schema changes

# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1243635120 25200 # Node ID 7dd85abd05e44f4a1c319e7284205a8365f56f5e # Parent a22bbefc05e5b294b254c58236b0f2abda65a23a [TEST] Update RedirectionSerivce 01 to work with recent schema changes Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r a22bbefc05e5 -r 7dd85abd05e4 suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py --- a/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Fri May 29 13:59:02 2009 -0700 +++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Fri May 29 15:12:00 2009 -0700 @@ -40,6 +40,7 @@ REDIRECTION_SER_TYPE = 3 CRS_MAX_SAP_REV = 724 libvirtcim_hr_crs_changes = 688 +schema_upgrade_change = 881 sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) @@ -88,9 +89,13 @@ 'EnabledState' : 2, 'EnabledDefault' : 2, 'RequestedState' : 12, - 'MaxConcurrentEnabledSAPs': max_sap_sessions } + if curr_cim_rev < schema_upgrade_change: + crs_list['MaxConcurrentEnabledSAPs'] = max_sap_sessions + else: + crs_list['MaxCurrentEnabledSAPs'] = max_sap_sessions + try: crs = EnumInstances(server, classname) except Exception, detail:

This tc failed with on F10 with KVM and current source. -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: FAIL 01_enum_crs.py:29: DeprecationWarning: the sets module is deprecated from sets import Set ERROR - TypeError : __call__() takes exactly 1 argument (2 given) Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "01_enum_crs.py", line 113, in main if res_val != exp_val: TypeError: __call__() takes exactly 1 argument (2 given) ERROR - None CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik@linux.vnet.ibm.com

Deepti B Kalakeri wrote:
This tc failed with on F10 with KVM and current source.
-------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: FAIL 01_enum_crs.py:29: DeprecationWarning: the sets module is deprecated from sets import Set ERROR - TypeError : __call__() takes exactly 1 argument (2 given) Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "01_enum_crs.py", line 113, in main if res_val != exp_val: TypeError: __call__() takes exactly 1 argument (2 given) ERROR - None CIM_ERR_INVALID_CLASS: Linux_ComputerSystem --------------------------------------------------------------------
This patch should fix this issue.. is it possible that the schema wasn't registered on the system properly? I recently upgraded the schema, so you'll need to do a full provider install: 1) make preuinstall 2) make uninstall 3) configure 4) make 5) make preinstall 6) restart the CIMOM 7) make postinstall This will pick up the new schema changes. The bug here is that the CRS attribute MaxConcurrentEnabledSAPs has changed to MaxCurrentEnabledSAPs in the 2.21 schema. So you can do a EnumerateInstances() query on your system to see what the value is. If you have current sources, but you see MaxConcurrentEnabledSAPs, then the schema update wasn't updated properly. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Kaitlin Rupert wrote:
Deepti B Kalakeri wrote:
This tc failed with on F10 with KVM and current source.
-------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: FAIL 01_enum_crs.py:29: DeprecationWarning: the sets module is deprecated from sets import Set ERROR - TypeError : __call__() takes exactly 1 argument (2 given) Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "01_enum_crs.py", line 113, in main if res_val != exp_val: TypeError: __call__() takes exactly 1 argument (2 given) ERROR - None CIM_ERR_INVALID_CLASS: Linux_ComputerSystem --------------------------------------------------------------------
This patch should fix this issue.. is it possible that the schema wasn't registered on the system properly?
I recently upgraded the schema, so you'll need to do a full provider install:
1) make preuinstall 2) make uninstall 3) configure 4) make 5) make preinstall 6) restart the CIMOM 7) make postinstall
This will pick up the new schema changes.
The bug here is that the CRS attribute MaxConcurrentEnabledSAPs has changed to MaxCurrentEnabledSAPs in the 2.21 schema.
So you can do a EnumerateInstances() query on your system to see what the value is. If you have current sources, but you see MaxConcurrentEnabledSAPs, then the schema update wasn't updated properly.
I verified this again with a fresh libvirt-cim and followed the 1) make preuinstall 2) make uninstall 3) ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig PROVIDERDIR=/usr/lib64/Pegasus/providers 4) make 5) make install 6) make preinstall sh -x base_schema/install_base_schema.sh `pwd`/base_schema + DATA=/usr/src/libvirt-cim/base_schema + NS=root/virt + CIMOM=pegasus *+ SCHEMA_VERSION=2.21.0* ++ mktemp -d /tmp/cim_schema.XXXXX + TMPDIR=/tmp/cim_schema.XSuBo + chmod a+x /tmp/cim_schema.XSuBo + '[' '!' -z '' ']' + DEBUG=/dev/null + '[' -z /usr/src/libvirt-cim/base_schema ']' + case "$CIMOM" in + '[' -f /dev/null ']' 7) restart the CIMOM 8) make postinstall [libvirt-cim]# ll base_schema/ total 1912 *-rw-r--r-- 1 root root 1888838 2009-03-29 16:55 cim_schema_2.21.0Experimental-MOFs.zip* -rw-r--r-- 1 root root 378 2009-06-03 00:37 cimv2.21.0-cimv2_mof -rw-r--r-- 1 root root 1377 2009-06-03 00:37 cimv2.21.0-interop_mof -rw-r--r-- 1 root root 1230 2009-06-03 00:37 fix_schema.patch -rw-r--r-- 1 root root 2965 2009-06-03 01:38 install_base_schema.sh -rwxr-xr-x 1 root root 2973 2009-06-03 00:37 install_base_schema.sh.in -rw-r--r-- 1 root root 13152 2009-06-03 01:38 Makefile -rwxr-xr-x 1 root root 434 2009-06-03 00:37 Makefile.am -rw-r--r-- 1 root root 12412 2009-06-03 00:38 Makefile.in -rw-r--r-- 1 root root 513 2009-06-03 00:37 README.DMTF you can see cim_schema_2.21.* downloaded. Here is what I got : wbemcli ei http://localhost:5988/root/virt:KVM_ConsoleRedirectionService -nl localhost:5988/root/virt:KVM_ConsoleRedirectionService.CreationClassName="KVM_ConsoleRedirectionService",Name="ConsoleRedirectionService",SystemCreationClassName="KVM_HostSystem",SystemName="localhost" -Caption= -Description= -ElementName="ConsoleRedirectionService" -InstallDate= -OperationalStatus= -StatusDescriptions= -Status= -HealthState= -PrimaryStatus= -DetailedStatus= -OperatingStatus= -CommunicationStatus= -EnabledState=2 -OtherEnabledState= -RequestedState=12 -EnabledDefault=2 -TimeOfLastStateChange= -AvailableRequestedStates= -TransitioningToState=12 -SystemCreationClassName="KVM_HostSystem" -SystemName="localhost" -CreationClassName="KVM_ConsoleRedirectionService" -Name="ConsoleRedirectionService" -PrimaryOwnerName= -PrimaryOwnerContact= -StartMode= -Started= -RedirectionServiceType=3 -OtherRedirectionServiceType= *-MaxConcurrentEnabledSAPs=* -SharingMode=3 Am I missing something ? -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik@linux.vnet.ibm.com

+1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik@linux.vnet.ibm.com
participants (2)
-
Deepti B Kalakeri
-
Kaitlin Rupert