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

M #-: Fix OpenNebula Market drivers custom URL

Fix argument parsing, use stdin and not argv

(cherry picked from commit 41461d4c03c9d3eae13ef6b0ce60a5dd9b64c8e4)
This commit is contained in:
Ruben S. Montero 2024-01-26 18:27:22 +01:00
parent a7e3de9092
commit 73e1ecdafa
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -250,13 +250,14 @@ end
################################################################################
begin
drv_message = Base64.decode64(ARGV[0])
drv_message64 = STDIN.read
drv_message = Base64.decode64(drv_message64)
doc = REXML::Document.new(drv_message).root
url = doc.elements['MARKETPLACE/TEMPLATE/ENDPOINT'].text rescue nil
url = doc.elements['/MARKETPLACE/TEMPLATE/ENDPOINT'].text rescue nil
rescue StandardError
nil
end
# TODO: get marketplace URL from MARKETPLACE Templace for other markets
one_market = OneMarket.new(url)
puts one_market.fetch_appliances