On 03/25/2014 03:20 AM, Xu Wang wrote:
These patches are based on V1. An unexpectable accident makes
me only one hand could work now so sorry everything from me
takes so long time.
Sorry to hear that - I have co-worker who did the same thing this past
July. Took him a while to be productive again.
Not sure if you followed along with the recent posts - I did try to take
what you've coded (in V1) and get things to work. There's patches from
me regarding Virtual Controller Device on the list. Unfortunately it
seems I didn't get the exactly right, but I'm assuming that I can
further massage them in order to make a ControllerRASD as well as the
Controller Logical Device (I think we're going to need one anyway if I
read Boris' response correctly).
Also the cimtest failures below most assuredly have to do with not
having a KVM_Controller RASD in the list... I think if you start with
'XenKvmLib/rasd.py' and start adding a ControllerRASD - you'll
eventually work your way through the tests.
HOWEVER, I am messing with cimtest right now. Upstream libvirt added a
keyboard device which (unfortunately) resides in the /devices/input
list. That makes it parseable and placed into the PointingDevice RASD
resulting in two InputRASD's being present. Now one can argue a
keyboard is not a PointingDevice - I get it, but what I found is the
cimtest tests have an inherent assumption that there's the Class Name
can be used as a key for a dictionary in python. That fails if there's
two InputRASD devices.
I have a pile of fixes for that where I've changed the dictionary to a
list of tuples with the Class Name as the first element and whatever the
dictionary was referencing as the second element.
I have cimtest passing with top of trunk. I have to test it on an older
libvirt to see what happens.
I also think that a keyboard shouldn't be a PointingDevice, but I'm
trying to "wait" to add that until we close on the Controller code.
So the short of it is - cimtest is going to be broken for a bit I think.
Now that I have my cimtest environment "working" I'll start looking at
this set of changes over the next day or so.
John
Updates from V1:
1. Added 2 break logic in switch.
2. Changed CIM_RES_TYPE_CONTROLLER into 32771.
3. Added XEN/KVM/LXC_Controller classes for cimtest.
Most of cimtest testcases have passed except the following:
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: FAIL
ERROR - Failed to get associators information for KVM_SettingsDefineState
ERROR - Exception: u'KVM_Controller'
--------------------------------------------------------------------
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: FAIL
ERROR - Expected 6 RASDs, got 7
--------------------------------------------------------------------
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: FAIL
ERROR - 7 RASD insts != 6 pool insts
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: FAIL
ERROR - 7 RASD insts != 6 pool insts
--------------------------------------------------------------------
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: FAIL
ERROR - 6 device insts != 7 RASD insts
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: FAIL
ERROR - u'KVM_Controller'
--------------------------------------------------------------------
--------------------------------------------------------------------
SystemDevice - 01_forward.py: FAIL
01_forward.py:29: DeprecationWarning: the sets module is deprecated
from sets import Set
ERROR - Device Class mismatch
ERROR - Exception Expected Device class list: ['KVM_DisplayController',
'KVM_LogicalDisk', 'KVM_Memory', 'KVM_NetworkPort',
'KVM_PointingDevice', 'KVM_Processor']
Got: [u'KVM_Controller', u'KVM_DisplayController',
u'KVM_LogicalDisk', u'KVM_Memory', u'KVM_NetworkPort',
u'KVM_PointingDevice', u'KVM_Processor']
--------------------------------------------------------------------
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: FAIL
ERROR - Unexpected RASD instance type
ERROR - Mistmatching association value
--------------------------------------------------------------------
I think they are caused by the parameter set of cimtest (such as KVM_Controller
or ControllerResourceAllocationSettingData should be added into some arrays.
But if you find they are caused by my coding errors, please let me know, thanks).
I'll fix these issues of cimtest later.
Dear John and Boris, could you help me testing it on RHEL6.5? I just
have an upgraded version and introduced some packages from CentOS source
(I am worried about they may influence the testing result). I'll rebuild
my developing environment later using pure RHEL 6.5 version.
Xu Wang (5):
libxutil: Controller Support
RASD: Schema and Provider Support for Controller RASDs
VSMS: Support for domains with controller devices
Device: CIM_LogicalDevice for controllers
Virt_Device: Add a device class for controllers
Makefile.am | 2 +
libvirt-cim.spec.in | 2 +
libxkutil/device_parsing.c | 70 ++++++++++++++++++++-
libxkutil/device_parsing.h | 9 +++
libxkutil/xmlgen.c | 30 +++++++++
schema/Controller.mof | 16 +++++
schema/Controller.registration | 5 ++
schema/ResourceAllocationSettingData.mof | 27 ++++++++
schema/ResourceAllocationSettingData.registration | 3 +
src/Virt_Device.c | 36 ++++++++++-
src/Virt_ElementAllocatedFromPool.c | 6 ++
src/Virt_ElementSettingData.c | 3 +
src/Virt_RASD.c | 24 +++++++
src/Virt_ServiceAffectsElement.c | 6 ++-
src/Virt_SettingsDefineState.c | 6 ++
src/Virt_SystemDevice.c | 3 +
src/Virt_VSSDComponent.c | 3 +
src/Virt_VirtualSystemManagementService.c | 44 +++++++++++++
src/svpc_types.h | 4 +-
19 files changed, 295 insertions(+), 4 deletions(-)
create mode 100644 schema/Controller.mof
create mode 100644 schema/Controller.registration