# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1246489133 25200
# Node ID d5f1540750c4dbe483ec90e1b278be90d76de1b9
# Parent a8b01b9726bf386defc29540e33f81e0850ac3a6
[TEST] #2 Update get_exp_template_rasd_len() based on template RASD additions
The providers now return template RASDs for both "bridge" and
"network"
interface types. In addition to that, the providers now return template
DiskPoolRASDs for iSCSI pools
Updates:
-Be sure not to overwrite expected len value.
-Changes related to recent NetRASD and DiskRASD updates
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r a8b01b9726bf -r d5f1540750c4 suites/libvirt-cim/lib/XenKvmLib/rasd.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Jul 01 11:23:00 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Jul 01 15:58:53 2009 -0700
@@ -320,7 +320,7 @@
exp_len = exp_base_num
if id == "DiskPool/0":
- pool_types = 5
+ pool_types = 7
return exp_base_num * pool_types
if virt == 'Xen' or virt == 'XenFV':
@@ -333,10 +333,11 @@
exp_len = exp_base_num + exp_cdrom
elif rev >= libvirt_rasd_dpool_changes and libvirt_ver >= '0.4.1':
- volumes = enum_volumes(virt, ip)
- exp_len = ((volumes * exp_base_num) + exp_cdrom) * xen_multi
+ volumes = enum_volumes(virt, ip)
+ exp_len = ((volumes * exp_base_num) + exp_cdrom) * xen_multi
- exp_len = (exp_base_num + exp_cdrom) * xen_multi
+ else:
+ exp_len = (exp_base_num + exp_cdrom) * xen_multi
elif virt == 'KVM':
if rev >= libvirt_rasd_new_changes and \
@@ -363,8 +364,9 @@
if rev >= net_rasd_template_changes:
dev_types = 2
+ net_types = 3
- return exp_base_num * dev_types
+ return exp_base_num * dev_types * net_types
def get_exp_template_rasd_len(virt, ip, id):
curr_cim_rev, changeset = get_provider_version(virt, ip)
Show replies by date
+1 for me.
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com