1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-08 20:58:17 +03:00

B #2437: importing resources from vCenter datastores with spaces and brackets works (#2463)

This commit is contained in:
Sergio Semedi Barranco 2018-10-03 14:05:03 +02:00 committed by Tino Vázquez
parent caa8ed3a81
commit bc4378105b

View File

@ -92,16 +92,13 @@ class Storage
VCenterDriver::VIHelper.check_opts(opts, [:persistent])
ds_name = disk[:datastore].name
image_path = disk[:path]
image_path = disk[:path_wo_ds]
image_type = disk[:type]
image_prefix = disk[:prefix]
one_image = {}
one_image[:template] = ""
# Remove ds info from path
image_path.sub!(/^\[#{ds_name}\] /, "")
# Get image name
file_name = File.basename(image_path).gsub(/\.vmdk$/,"")