F #~: fix import images with spaces (#1048)

Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
Carlos J. Herrera authored and GitHub committed 2021-03-31 10:26:49 +02:00
1 parent 0b7ba05032
commit fe2eb12883
1 file changed
+2 -1
@@ -231,10 +231,11 @@ module VCenterDriver
@ref_hash[attribute][refkey]
end
require 'addressable'
def self.find_image_by(att, the_class, path, ds_id, pool = nil)
pool = one_pool(the_class, false) if pool.nil?
pool.find do |e|
e[att] == path &&
e[att] == Addressable::URI.escape(path) &&
e['DATASTORE_ID'] == ds_id
end
end