1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

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

Signed-off-by: Carlos Herrera <cherrera@opennebula.io>
This commit is contained in:
Carlos J. Herrera 2021-03-31 04:26:49 -04:00 committed by GitHub
parent 0b7ba05032
commit fe2eb12883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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