1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-04-02 10:50:07 +03:00

M #-: scape blank spaces in vCenter disk names (#386)

(cherry picked from commit 42d5ce88b33fd61428ca3712feb4963f327461a1)
This commit is contained in:
Alejandro Huertas Herrero 2020-11-03 11:06:20 +01:00 committed by Ruben S. Montero
parent a0ccaa6e1c
commit 5cb31f4892
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -465,7 +465,12 @@ module VirtualMachineMonitor
info_disks.each do |disk|
next if disk[1].no_exists?
str_info << "DISK_#{disk[0].gsub(' ', '_')}_ACTUAL_PATH=\"[" <<
name = disk[0]
# Delete special characters
name.gsub!(/[^0-9A-Za-z]/, '_')
str_info << "DISK_#{name}_ACTUAL_PATH=\"[" <<
disk[1].ds.name << '] ' << disk[1].path << '" ' << "\n"
end