curr_cim_rev, changeset = get_provider_version(virt, server)
if 'DiskPool' in ap['InstanceID'] and virt =='Xen'
and \
- curr_cim_rev >= libvirt_rasd_template_changes:
+ curr_cim_rev >= libvirt_rasd_template_changes and \
+ curr_cim_rev < libvirt_rasd_new_changes:
# For Diskpool, we have info 1 for each of Min, Max,
# default, Increment and 1 for each of PV and FV
# hence 4 * 2 = 8 records
+ exp_len = 8
+ elif 'DiskPool' in ap['InstanceID'] and virt ==
'Xen' and \
+ curr_cim_rev >= libvirt_rasd_new_changes:
+ exp_len = 16
+ elif 'DiskPool' in ap['InstanceID'] and virt ==
'KVM' and \
+ curr_cim_rev >= libvirt_rasd_new_changes:
exp_len = 8
else:
exp_len = 4
Also this can be simplified to:
if 'DiskPool' in ap['InstanceID']:
if virt =='Xen' and curr_cim_rev >= libvirt_rasd_new_changes:
(etc)
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com