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:
parent
a7e3de9092
commit
73e1ecdafa
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user