mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 12:22:38 +09:00
Feature #4217: Add capabilities to market_mad/one to talk with other
MarketPlaces
This commit is contained in:
1 parent
b332b5a4cb
commit
4333bb6da2
1 file changed
+8
-2
@@ -20,6 +20,7 @@ require 'net/http'
|
||||
require 'uri'
|
||||
require 'json'
|
||||
require 'base64'
|
||||
require 'rexml/document'
|
||||
|
||||
class OneMarket
|
||||
ONE_MARKET_URL = 'http://marketplace.opennebula.systems/'
|
||||
@@ -143,6 +144,11 @@ end
|
||||
################################################################################
|
||||
# Main Program. Outpust the list of marketplace appliances
|
||||
################################################################################
|
||||
|
||||
drv_message = Base64::decode64(ARGV[0])
|
||||
doc = REXML::Document.new(drv_message).root
|
||||
url = doc.elements['MARKETPLACE/TEMPLATE/ENDPOINT'].text rescue nil
|
||||
|
||||
#TODO get marketplace URL from MARKETPLACE Templace for other markets
|
||||
one_market = OneMarket.new
|
||||
puts one_market.get_appliances()
|
||||
one_market = OneMarket.new(url)
|
||||
puts one_market.get_appliances
|
||||
Reference in new issue
Block a user