[PATCH 00/10] cimtest: changes for controller and upstream support
by John Ferlan
Here's my bundle of cimtest related changes to support Controllers,
Controller Pools, and libvirt upstream addition of a keyboard device.
I have tested all these changes on both my upstream libvirt-cim environment
and a RHEL6.5 libvirt-cim environment. The only failures I get are in
the indiciations tests which I've never had working quite right. My testing
process was to add each patch separately and ensure that each didn't
change the RHEL6.5 results.
I've used the currently posted libvirt-cim revision number sequence as
the key to whether or not support for the controller and controller pool
will be added/checked. The numbers 1310 and 1312 may changed base on
how the libvirt-cim submit goes.
I have split them up into "bundles" of changes:
Patch 1: is a rebase/repost of a change I posted back in November. It's
still a valid change since then. I don't think I got an ACk for
it back then, so reposted
Patch 2: is a change because nfs server tests were failing in my upstream
environment on f19. I just added a parameter as nfs-server.service
told me to do and things worked.
Patch 3
Patch 4: These are infrastructure changes - Patch 3 is basically converting
all code that uses Dictionaries and the Class Name as the key to
the dictionary with lists of tuples that have the classname and
the element formerly inserted into the dictionary key. Patch 4 is
much of the same, but a bit more gnarly with respect to what it
did - so I kept it separate
Patch5
Patch6: Adds support for controller RASD - I can merge these later, but
keeping them separate was easier for code review purposes
Patch7
Patch8: Adds support for controller pools. Again, these can be merged, but
for review purposes - I'll keep them separate.
Patch9
Patch10: Adds support to handle the keyboard RASD as an input device. I have
a set of libvirt-cim code that will go along with this, but since
it's in my branch already - I just posted it anyway. It was part
of my RHEL6 environment testing. These won't be pushed with the
controller changes, but would be pushed eventually.
John Ferlan (10):
live.full_hostname: Adjust mechanism to get FQDN
XenKvmLib: Adjust systemd nfs server settings
cimtest: Use lists instead of dictionaries
cimtest: VSSDC - 02-reverse.py - adjust iteration of association
XenKvmLib: Add controller device
cimtest: Add controller RASD support
XenKvmLib: Add controller pool
cimtest: Add controller pool support
XenKvmLib: Add keyboard input RASD
cimtest: Add support for keyboard input device
lib/VirtLib/live.py | 11 +-
.../cimtest/AllocationCapabilities/01_enum.py | 4 +
.../ComputerSystem/41_cs_to_settingdefinestate.py | 57 +++++-----
.../cimtest/ElementCapabilities/01_forward.py | 1 +
.../cimtest/HostSystem/02_hostsystem_to_rasd.py | 25 +++--
.../cimtest/HostSystem/04_hs_to_EAPF.py | 3 +
.../cimtest/HostedResourcePool/01_forward.py | 7 +-
.../cimtest/RASD/01_verify_rasd_fields.py | 18 ++-
.../ResourceAllocationFromPool/02_reverse.py | 12 +-
.../cimtest/ServiceAffectsElement/01_forward.py | 57 +++++-----
.../cimtest/ServiceAffectsElement/02_reverse.py | 22 ++--
.../cimtest/SettingsDefine/02_reverse.py | 36 +++---
.../libvirt-cim/cimtest/SystemDevice/01_forward.py | 19 +++-
suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py | 27 ++++-
.../02_reverse.py | 124 ++++++++++++++-------
suites/libvirt-cim/lib/XenKvmLib/common_util.py | 4 +-
suites/libvirt-cim/lib/XenKvmLib/devices.py | 6 +
suites/libvirt-cim/lib/XenKvmLib/logicaldevices.py | 2 +-
suites/libvirt-cim/lib/XenKvmLib/pool.py | 6 +
suites/libvirt-cim/lib/XenKvmLib/rasd.py | 47 +++++++-
suites/libvirt-cim/lib/XenKvmLib/vsms.py | 24 ++++
suites/libvirt-cim/lib/XenKvmLib/vxml.py | 40 +++++--
22 files changed, 393 insertions(+), 159 deletions(-)
--
1.8.5.3
10 years, 6 months
[PATCH v3 0/8] Add Controller Device Support
by John Ferlan
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
--
1.8.5.3
10 years, 7 months