Ping? Any thoughts on the changes? I'd like to get this off my list of
things to do...
Thanks
John
On 03/27/2014 05:18 PM, John Ferlan wrote:
I know this is a long cover letter, but it covers a lot of ground...
I was just about done with all the merges this morning - I ran the cimtest
one more time and found that there's a couple of tests which associate
RASDs and Pools. So I jumped into the rabbit hole and wound my way through
the maze of twisty little passages. I even heard a babbling brook (it's an
old computer game reference).
So here's where I'm at - I have cimtest completely passing again which keeps
me happy. Although I have a pile of cimtest related changes that will also
need to be made, but I have to wait to do them until I get a libvirt-cim
revision number to compare against so as to be able to add conditional code
to support controllers devices, rasds, and pools.
For now support is only for KVM. We've already determined LXC doesn't have
the concept of a controller and I have no way to test Xen. I also don't have
the cycles to dig through the Xen source code and determine what that driver
supports. If someone wants to add that - great - have at it!
I want to put it out there for review - knowing that I probably still have
a bit of cleanup left. I think I'm going to need to add KVM specific code
to a number of places, but I figured I needed to get everything merged first
then I could determine that. I'm also hoping it'll be pointed out to me :-).
I kept the changes split even though I know only changes 1 & 2 can be compiled
alone and run without any new cimtest failures. Each step of changes can
compile successfully/cleanly - although once you hit change 3, you'll need
to regenerate your Makefile
Changes 1 & 2 are more or less Xu's previous patch #1. I split it for
ease of review - there's no real reason, although you will note I
have left out the addition of CONTROLLER to the cim_res_types until
patch 4... With that patch 2 will have cimtest failures.
Change 3 adds the MOF's and adjusts the install resulting in cimtest
failures because of "missing" links between MOF and code.
Change 4 adds the bulk of the code required to fill in all the fields for
the mofs from the xml/data structures.
Change 6 adds the various associations between the new elements
Change 7 adds the MOF's and modifies install/build to include ControllerPool's
Change 8 adds the code and associations for Controller Pools. Without it
there are a few cimtest failures.
My plan is to allow review of Changes 3->8 separately, but when it comes
time to push - 3-8 could be squashed together so that the ability to bisect
history and run cimtest without too many failures isn't lost. Although I'm
also considering combining 3-6 and 7-8 for "functionality" likeness. I'll
take suggestions from the community if it's felt strongly to keep the split
as is, then so bit it.
The following is a list of the differences between this set of changes
and what Xu posted as his v2. All I did was pull down his changes into a
clean branch, then 'git am' those changes. Then after making all my changes
a simple 'git diff' of the branches let me know what was different.
Makefile.am
* Copyright date
* Add controller pool
libvirt-cim.spec.in
* Order - kept closer to DisplayController/PointingDevice
* Add controller pool
libxkutil/device_parsing.c
* Copyright date
* Additional CU_DEBUG messages - useful in debugging free() issues
* Merged sgio/rawio changes
* cleanup_controller_device():
* Free new controller fields for queues, ports, vectors, address
* Changed controller 'type' from "char *" to "uint16_t",
no need to free
* parse_controller_device():
* Use controller_protocol_type_StrToID() to store type integer
* Fail in "index" is not present
* Convert/store "index" as uint64_t and free "index"
* Added controller fields for queues, ports, vectors, address
* Format id as "controller:<type_str>:<index#>"
libxkutil/device_parsing.h
* Copyright date
* Add CONTROLLER_INDEX_NOT_SET as -1
* Change type to uint16_t, add uint64_t index, and char */device_address fields
libxkutil/xmlgen.c
* Copyright date
* Change how we store fields
* Be sure to convert the "type" to it's string representation
* Handle missing/default Index value (eg from define system from vdev)
* Print out model, ports, vectors, queues, and address if present
schema/Controller.mof
* Remove {Xen|LXC}_Controller
schema/Controller.registration
* Remove {Xen|LXC}_Controller
schema/ControllerPool.mof
* Add ControllerPool mof
schema/ControllerPool.registration
* Add ControllerPool registration
schema/ResourceAllocationSettingData.mof
* Copyright date
* Merged rawio/sgio changes
* Remove {Xen|LXC}_ControllerResourceAllocationSettingData
* Add comments and properties we care about
schema/ResourceAllocationSettingData.registration
* Copyright date
* Remove {Xen|LXC}_ControllerResourceAllocationSettingData
src/Virt_Device.c
* Copyright date
* Set the Virtual Controller Logical Device properties:
* ProtocolSupported <== String from controller_device->type (pci, usb, etc.)
* ProtocolDescription <== If available, string from model
* Adjusted some debug messages
* Removed incorrect setting of "Controller" property (twice)
src/Virt_DevicePool.c
* Add ControllerPool support
src/Virt_ElementAllocatedFromPool.c
* Copyright date
* Remove Xen/LXC associations
* Add ControllerPool
src/Virt_ElementCapabilities.c
* Copyright date
* Add ControllerPool
src/Virt_ElementSettingData.c
* Copyright date
* Remove Xen/LXC associations
src/Virt_HostedResourcePool.c
* Copyright date
* Add ControllerPool
src/Virt_RASD.c
* Copyright date
* Merged sgio/rawio changes
* set_controller_rasd_params():
* Set the fields properly based on defintion of structure/mof
* ResourceSubType <== String-ified type (pci, usb, etc)
* Other fields set if available in data structure
* Changed vdev_device -> type to use CIM_RES_TYPE_OTHER - this is the parent
structure to the controller_device structure
src/Virt_ResourceAllocationFromPool.c
* Copyright date
* Controller RASD Association
* ControllerPool Association
src/Virt_ResourcePoolConfigurationService.c
* Copyright date
* Add ControllerPool
src/Virt_ServiceAffectsElement.c
* Copyright date
* Add "Controller" to list that use get_device_by_ref() call
* Remove Xen/LXC associations
src/Virt_SettingsDefineState.c
* Copyright date
* Remove Xen/LXC associations
src/Virt_SystemDevice.c
* Copyright date
* Remove Xen/LXC associations
src/Virt_VSSDComponent.c
* Copyright date
* Remove Xen/LXC associations
src/Virt_VirtualSystemManagementService.c
* Copyright date
* Merged sgio/rawio changes
* Fix controller_rasd_to_vdev():
* Handle the controller_device->type properly to get 'type_str'
* Build dev->id based on Index:
NOTE: I found through debugging cimtest code that on input the dev->id
is NULL. It cannot be left that way since a subsequent call to
add_device_nodup() would core on the STREQC(ptr->id, dev->id).
Thus I formulated an InstanceID with the -1. If there's another
similarly "undefined" element, it'll go through the overriding
code and be removed.
* Set other fields if present in data
* Following Boris' earlier advice, mimic the method that disks, networks,
and graphics devices use to set things up.
* Similarly for resource_del, resource_add, and resource_mod - allow
the code to do it's magic for controller devices.
* HMM: Given what I discovered about dev->id in controller_rasd_to_vdev()
described above, I wonder if the check in resource_add could ever
happen. I guess it's "safe" to keep...
src/svpc_types.h
* Copyright date
* Add some pointers to where to find the details we're describing
* Add CIM_controller_protocol_type enum to describe the various values
* Add controller_protocol_type_StrToID() and controller_protocol_type_IDToStr()
to handle the "supported" conversions
John Ferlan (3):
Associations
Add MOFS and change install for ControllerPools
Add code and associations for ControllerPool
Xu Wang (5):
Add virtual controller device types
Parse/Store controller XML tags
Add virtual controller object definitions to mofs
Set fields in mofs for Controller Device/RASD
VSMS: Support for domains with controller devices
Makefile.am | 6 +-
libvirt-cim.spec.in | 4 +
libxkutil/device_parsing.c | 119 ++++++++++++++++++-
libxkutil/device_parsing.h | 17 ++-
libxkutil/xmlgen.c | 74 +++++++++++-
schema/Controller.mof | 7 ++
schema/Controller.registration | 4 +
schema/ControllerPool.mof | 6 +
schema/ControllerPool.registration | 3 +
schema/ResourceAllocationSettingData.mof | 37 +++++-
schema/ResourceAllocationSettingData.registration | 3 +-
src/Virt_Device.c | 68 ++++++++++-
src/Virt_DevicePool.c | 55 ++++++++-
src/Virt_ElementAllocatedFromPool.c | 6 +-
src/Virt_ElementCapabilities.c | 4 +-
src/Virt_ElementSettingData.c | 3 +-
src/Virt_HostedResourcePool.c | 3 +-
src/Virt_RASD.c | 57 +++++++++-
src/Virt_ResourceAllocationFromPool.c | 2 +
src/Virt_ResourcePoolConfigurationCapabilities.c | 2 +-
src/Virt_ResourcePoolConfigurationService.c | 2 +
src/Virt_ServiceAffectsElement.c | 8 +-
src/Virt_SettingsDefineState.c | 4 +-
src/Virt_SystemDevice.c | 3 +-
src/Virt_VSSDComponent.c | 3 +-
src/Virt_VirtualSystemManagementService.c | 87 +++++++++++++-
src/svpc_types.h | 132 +++++++++++++++++++++-
27 files changed, 695 insertions(+), 24 deletions(-)
create mode 100644 schema/Controller.mof
create mode 100644 schema/Controller.registration
create mode 100644 schema/ControllerPool.mof
create mode 100644 schema/ControllerPool.registration