This is similar to the existing supports_virtio*() functions, but for virtio-scsi. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- virtinst/guest.py | 2 ++ virtinst/osdict.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/virtinst/guest.py b/virtinst/guest.py index 3478acc7..4e7bcd41 100644 --- a/virtinst/guest.py +++ b/virtinst/guest.py @@ -379,6 +379,8 @@ class Guest(XMLBuilder): return self._supports_virtio(self.osinfo.supports_virtionet()) def supports_virtiodisk(self): return self._supports_virtio(self.osinfo.supports_virtiodisk()) + def supports_virtioscsi(self): + return self._supports_virtio(self.osinfo.supports_virtioscsi()) def _supports_virtioserial(self): return self._supports_virtio(self.osinfo.supports_virtioserial()) diff --git a/virtinst/osdict.py b/virtinst/osdict.py index 5735d835..23a9bb0b 100644 --- a/virtinst/osdict.py +++ b/virtinst/osdict.py @@ -377,6 +377,12 @@ class _OsVariant(object): "http://pcisig.com/pci/1af4/1042"] return bool(self._device_filter(devids=devids)) + def supports_virtioscsi(self): + # virtio-scsi and virtio1.0-scsi + devids = ["http://pcisig.com/pci/1af4/1004", + "http://pcisig.com/pci/1af4/1048"] + return bool(self._device_filter(devids=devids)) + def supports_virtionet(self): # virtio-net and virtio1.0-net devids = ["http://pcisig.com/pci/1af4/1000", -- 2.20.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list