To test controller device new element <controller type='pci' index='0'
model='pci-root'> was introduced into domain xml. But it was not supported
until libvirt-1.0.5. Now RHEL-6.5 is using libvirt-0.10.2-29. It could
involve regression issue. Hence here I updated it to <controller type='scsi'
index='0' model='virtio-scsi'> to test fields of this device.
Signed-off-by: Xu Wang <gesaint(a)linux.vnet.ibm.com>
---
.../libvirt-cim/cimtest/SystemDevice/01_forward.py | 6 +++++-
.../02_reverse.py | 6 +++++-
suites/libvirt-cim/lib/XenKvmLib/vxml.py | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
index f81aff1..3fab346 100644
--- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
+++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
@@ -133,7 +133,11 @@ def main():
if curr_cim_rev >= controller_rev and virt == 'KVM':
controller_cn = get_typed_class(virt, "Controller")
exp_pllist[controller_cn] = []
- exp_pllist[controller_cn].append('%s/controller:pci:0' % test_dom)
+ exp_pllist[controller_cn].append('%s/controller:scsi:0' % test_dom)
+ # pci-root gets added automagically for us since scsi has to
+ # hang somewhere
+ if virsh_version_cmp(libvirt_version, "1.0.5") >= 0:
+ exp_pllist[controller_cn].append('%s/controller:pci:0' % test_dom)
exp_pllist[controller_cn].append('%s/controller:usb:0' % test_dom)
try:
diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
index a7e6c17..89124e3 100644
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
@@ -101,7 +101,11 @@ def assoc_values(ip, assoc_info, virt="Xen"):
if curr_cim_rev >= controller_rev:
# Add controllers too ... will need a cim/cimtest version check
- rasd_list.update({"pci_rasd":"%s/controller:pci:0" %
test_dom})
+ rasd_list.update({"scsi_rasd":"%s/controller:scsi:0" %
test_dom})
+ # pci-root gets added automagically for us since scsi has to
+ # hang somewhere
+ if virsh_version_cmp(libvirt_version, "1.0.5") >= 0:
+ rasd_list.update({"pci_rasd":"%s/controller:pci:0" %
test_dom})
rasd_list.update({"usb_rasd":"%s/controller:usb:0" %
test_dom})
expect_rasds = len(rasd_list)
diff --git a/suites/libvirt-cim/lib/XenKvmLib/vxml.py
b/suites/libvirt-cim/lib/XenKvmLib/vxml.py
index c38b4dd..8c4256c 100644
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py
@@ -937,7 +937,7 @@ class KVMXML(VirtXML, VirtCIM):
is_ipv6_only=None,
port_num='-1', keymap="en-us",
irstype="mouse",
btype="ps2", vnc_passwd=None,
- ctltype="pci", ctlindex=0,
ctlmodel="pci-root"):
+ ctltype="scsi", ctlindex=0,
ctlmodel="virtio-scsi"):
# Optionally the following works too:
#ctltype="usb", ctlindex=0, ctlmodel=None):
if not os.path.exists(disk_file_path):
--
1.7.1
Show replies by date