mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-27 03:21:29 +03:00
F #~: fix sanitize when import (#771)
Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
parent
d4d133b882
commit
fe166a9bdc
@ -554,7 +554,7 @@ module VCenterDriver
|
||||
full_process = !args[:short]
|
||||
|
||||
vc_network_ref = vc_network._ref
|
||||
vc_network_name = VCenterDriver::FileHelper.sanitize(
|
||||
vc_network_name = VCenterDriver::VcImporter.sanitize(
|
||||
vc_network.name
|
||||
)
|
||||
vc_network_host = vc_network['host']
|
||||
|
@ -385,6 +385,14 @@ module VCenterDriver
|
||||
end
|
||||
end
|
||||
|
||||
def self.sanitize(text)
|
||||
bad_chars = ['|']
|
||||
bad_chars.each do |bad_char|
|
||||
text.gsub!(bad_char, '_')
|
||||
end
|
||||
text
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user