1
0
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:
mcabrerizo 2017-06-23 11:21:32 +02:00
parent 509d98dff9
commit f7bf1c05ba
2 changed files with 4 additions and 2 deletions

View File

@ -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')

View File

@ -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')