Dan Kenigsberg has submitted this change and it was merged.

Change subject: hostdev: move usb device code to separate class
......................................................................


hostdev: move usb device code to separate class

We continue the effort of splitting the host device logic to multiple
classes with USB device. Same commit message for reference:

At present, we use a single class to contain all three host devices -
PCI, USB and SCSI. Although they look mostly the same at first, there
are many hidden differences between the devices. The differences range
from simple XML inconsistency to a critical driver specific requirements.

When the devices are separated, we can dynamically create appropriate
class from HostDevice "factory". The end result is slight code
duplication (not really avoidable in devices) but extreme readability
improvement.

Examples of device differences:
* different padding and base in libvirt addressing for PCI and USB,
 SCSI,
* no guest address for USB devices is generated by libvirt,
* SCSI is addressed by it's source address and adapter, as opposed to
 source address only in PCI and USB[1],
* PCI devices should not be reattached, other devices should[2],
* XML itself.

[1] Implies unfortunate bug that SCSI host devices can't be hot-plugged.
[2] This is true only because reattach, in it's current version, does
more then just reattach the device. It modifies the permissions on the
udev device by creating udev rule. The rule should be removed. The
removal process must be split from reattach call.

Change-Id: I481a966776089f37971a27637e06d21eafabd05c
Signed-off-by: Martin Polednik <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/57958
Reviewed-by: Milan Zamazal <[email protected]>
Continuous-Integration: Jenkins CI
Reviewed-by: Francesco Romani <[email protected]>
---
M vdsm/virt/vmdevices/hostdevice.py
1 file changed, 87 insertions(+), 0 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Francesco Romani: Looks good to me, approved
  Martin Polednik: Verified
  Milan Zamazal: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/57958
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I481a966776089f37971a27637e06d21eafabd05c
Gerrit-PatchSet: 16
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Milan Zamazal <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to