1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #2274: it is possible to remove disk from vCenter templates (#2383)

This commit is contained in:
Sergio Semedi Barranco 2018-09-05 16:58:38 +02:00 committed by Tino Vázquez
parent 052a06d5f7
commit ca5b1f7210

View File

@ -1247,11 +1247,9 @@ class VirtualMachine < VCenterDriver::Template
persistent = VCenterDriver::VIHelper.find_persistent_image_by_source(source, ipool)
if !persistent
detach_disk_array << {
:fileOperation => :destroy,
:operation => :remove,
:device => d[:device]
}
op = {operation: :remove, device: d[:device]}
op[:fileOperation] = :destroy unless d[:type] == "CDROM"
detach_disk_array << op
end
# Remove reference opennebula.disk if exist