Skip to content

Commit

Permalink
M #-: Fix OpenNebula Market drivers custom URL
Browse files Browse the repository at this point in the history
Fix argument parsing, use stdin and not argv
  • Loading branch information
rsmontero committed Jan 26, 2024
1 parent 58d7367 commit 41461d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/market_mad/remotes/one/monitor
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 41461d4

Please sign in to comment.