From: root <root(a)RH64wenchao.(none)>
Signed-off-by: Wenchao Xia <xiawenc(a)linux.vnet.ibm.com>
---
suites/libvirt-cim/lib/XenKvmLib/rasd.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/suites/libvirt-cim/lib/XenKvmLib/rasd.py
b/suites/libvirt-cim/lib/XenKvmLib/rasd.py
index d65011e..11b0e38 100644
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py
@@ -32,7 +32,7 @@ from XenKvmLib.const import default_pool_name, default_network_name, \
get_provider_version, default_net_type
from XenKvmLib.pool import enum_volumes
from XenKvmLib.xm_virt_util import virsh_version
-from XenKvmLib.common_util import parse_instance_id
+from XenKvmLib.common_util import parse_instance_id, get_version_number
pasd_cn = 'ProcResourceAllocationSettingData'
nasd_cn = 'NetResourceAllocationSettingData'
@@ -382,8 +382,9 @@ def get_exp_disk_rasd_len(virt, ip, rev, id):
else:
exp_len = (volumes * exp_base_num) + exp_cdrom
-
- if virt != 'LXC' and libvirt_ver >= '0.4.1':
+ a = get_version_number(libvirt_ver)
+ b = get_version_number("0.4.1")
+ if virt != 'LXC' and a >= b:
if rev >= libvirt_rasd_storagepool_changes:
exp_len += exp_storagevol_rasd
--
1.7.1