41
42
43
44
45
46
47
48
49
50
|
# File 'lib/hsp/cli.rb', line 41
def agent
m = Marketplace.new
m.websocket_url = options[:websocket_url] if options[:websocket_url]
m.rest_url = options[:rest_url] if options[:rest_url]
response = HTTParty.get(m.services_url(options[:service_id]), headers: Hsp::Client.)
json = JSON.parse(response.body)
agent = Hsp::Agent.new(m, Hsp::Orchestrator::Docker.new, options[:platform_id], options[:platform_secret])
agent.run(options[:platform_id], !!options[:show_pings])
end
|