Richard Maciel wrote:
# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1236119796 10800
# Node ID 98c21125d5e24022750fa1adf12289bbbbb5a9df
# Parent 1aff0d0e9bf49e738827b7157c0df407b814ae7d
#2 Changed the output of AllocationCapability association when using DiskPool as input
This patch fix the results of a 'association instances' query when passing a disk
pool AllocationCapabilities reference as input. Before this patch, this query returned
RASD templates for the disk pools, but now it returns the RASD templates for each of the
volumes which composes the disk pool passed as input.
2:
- Changed code style based on feedback
- When emulation_type = 1 (cdrom device), the VirtualQuantity property of the template
is not set
- Changed ID of cdrom device
- LXC is handled in a special way, because it doesn't have volumes
To test:
- Create a domain containing a diskpool and some volumes
- Execute query: wbemcli ein
'http://localhost:5988/root/virt:CIM_AllocationCapabilities'
- Select the reference to a diskpool and use in an association query like the one below:
wbemcli ai -nl -ac KVM_SettingsDefineCapabilities
'http://@localhost:5988/root/virt:KVM_AllocationCapabilities.InstanceID="DiskPool/default"'
- There must be four templates for each volume in the diskpool (MINIMUM, MAXIMUM,
DEFAULT, INCREMENT) and their address must correspond to the address of the volume
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 1aff0d0e9bf4 -r 98c21125d5e2 src/Virt_SettingsDefineCapabilities.c
These changes look good. However, I failed to catch it in my previous
review, but these changes won't be compatible with versions of libvirt
that don't have diskpool support.
You'll need to generate the DiskRASDs in that situation as it's handled
in the original code.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com