Francesco Romani has posted comments on this change.
Change subject: virt: Use Drive.diskType instead of networkDev and blockDev ......................................................................
Patch Set 4: Code-Review+1
(1 comment)
the patch looks good. I have concerns about disks being possibly misidentified because the introduction of the network disk type, but this patch makes the code no worse in this regard.
https://gerrit.ovirt.org/#/c/40472/4/vdsm/virt/vm.py File vdsm/virt/vm.py:
Line 1873: # update the type Line 1874: diskDeviceXmlElement.setAttribute('type', vmDrive.diskType) Line 1875: Line 1876: # update the path Line 1877: attr = 'dev' if vmDrive.diskType == DISK_TYPE.BLOCK else 'file' not related to this (good) change, but regarding this topic branch.
I'm not sure there is any guarantee that we will never get there with vmDrive.diskType == DISK_TYPE.NETWORK, hence triggering a bug. Line 1878: diskDeviceXmlElement.getElementsByTagName('source')[0]. \ Line 1879: setAttribute(attr, vmDrive.path) Line 1880: Line 1881: # update the format (the disk might have been collapsed)