mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-13 12:58:17 +03:00
F #4913: Disable rm_directory for vCenter 6.5
This commit is contained in:
parent
509d98dff9
commit
f7bf1c05ba
@ -79,7 +79,8 @@ begin
|
||||
ds.delete_file(img_src)
|
||||
end
|
||||
|
||||
ds.rm_directory(img_dir) if ds.dir_empty?(img_dir)
|
||||
vcenter_version = vi_client.vim.serviceContent.about.apiVersion
|
||||
ds.rm_directory(img_dir) if ds.dir_empty?(img_dir) && vcenter_version != "6.5"
|
||||
|
||||
rescue Exception => e
|
||||
if !e.message.start_with?('FileNotFound')
|
||||
|
@ -119,7 +119,8 @@ if path.match(/disk\.\d+$/)
|
||||
|
||||
ds.delete_virtual_disk(img_path)
|
||||
img_dir = File.dirname(img_path)
|
||||
ds.rm_directory(img_dir) if ds.dir_empty?(img_dir)
|
||||
vcenter_version = vi_client.vim.serviceContent.about.apiVersion
|
||||
ds.rm_directory(img_dir) if ds.dir_empty?(img_dir) && vcenter_version != "6.5"
|
||||
|
||||
rescue Exception => e
|
||||
if !e.message.start_with?('FileNotFound')
|
||||
|
Loading…
x
Reference in New Issue
Block a user