Nir Soffer has posted comments on this change.
Change subject: virt: Use Drive.diskType instead of networkDev and blockDev ......................................................................
Patch Set 4:
(1 comment)
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.
This validation is indeed missing in the current code. I will add code failing loudly if we get a network disk where we expect only file or block. 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)