[virt-tools-list] [virt-manager PATCH 1/6] guest: Remove some SCSI-related dead code
Andrea Bolognani
abologna at redhat.com
Mon Mar 4 16:11:13 UTC 2019
The code in _add_implied_controllers() tries to add an ibmvscsi
controller if any disk with spapr-vio address type is found;
however, regardless of the specific SCSI controller in use, all
SCSI disks will use the drive address type, so that condition
will never be triggered - which is actually for the best, since
we want to use virtio-scsi on ppc64 anyway.
Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
virtinst/guest.py | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 6e05b5b5..3478acc7 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -793,24 +793,10 @@ class Guest(XMLBuilder):
self.add_device(dev)
def _add_implied_controllers(self):
- has_spapr_scsi = False
has_any_scsi = False
for dev in self.devices.controller:
if dev.type == "scsi":
has_any_scsi = True
- if dev.address.type == "spapr-vio":
- has_spapr_scsi = True
-
- # Add spapr-vio controller if needed
- if not has_spapr_scsi:
- for dev in self.devices.disk:
- if dev.address.type == "spapr-vio":
- ctrl = DeviceController(self.conn)
- ctrl.type = "scsi"
- ctrl.address.set_addrstr("spapr-vio")
- ctrl.set_defaults(self)
- self.add_device(ctrl)
- break
# Add virtio-scsi controller if needed
if ((self.os.is_arm_machvirt() or self.os.is_pseries()) and
--
2.20.1
More information about the virt-tools-list
mailing list