From 41461d4c03c9d3eae13ef6b0ce60a5dd9b64c8e4 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Fri, 26 Jan 2024 18:27:22 +0100 Subject: [PATCH] M #-: Fix OpenNebula Market drivers custom URL Fix argument parsing, use stdin and not argv --- src/market_mad/remotes/one/monitor | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/market_mad/remotes/one/monitor b/src/market_mad/remotes/one/monitor index 37d35d7e718..7b109892d01 100755 --- a/src/market_mad/remotes/one/monitor +++ b/src/market_mad/remotes/one/monitor @@ -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