Enable rm_directory for vcenter 6.5

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

No files matched your search

+1 -2
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')
+1 -2
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')