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

Enable rm_directory for vcenter 6.5

This commit is contained in:
mcabrerizo 2017-06-28 15:23:46 +02:00
parent 00b7d8607a
commit e04dba14e4
2 changed files with 2 additions and 4 deletions

View File

@ -79,8 +79,7 @@ begin
ds.delete_file(img_src)
end
vcenter_version = vi_client.vim.serviceContent.about.apiVersion
ds.rm_directory(img_dir) if ds.dir_empty?(img_dir) && vcenter_version != "6.5"
ds.rm_directory(img_dir) if ds.dir_empty?(img_dir)
rescue Exception => e
if !e.message.start_with?('FileNotFound')

View File

@ -119,8 +119,7 @@ if path.match(/disk\.\d+$/)
ds.delete_virtual_disk(img_path)
img_dir = File.dirname(img_path)
vcenter_version = vi_client.vim.serviceContent.about.apiVersion
ds.rm_directory(img_dir) if ds.dir_empty?(img_dir) && vcenter_version != "6.5"
ds.rm_directory(img_dir) if ds.dir_empty?(img_dir)
rescue Exception => e
if !e.message.start_with?('FileNotFound')