class Egi::Fedcloud::Cloudhound::Connector
Public Class Methods
new(opts = {}, password = nil)
click to toggle source
# File lib/egi/fedcloud/cloudhound/connector.rb, line 9 def initialize(opts = {}, password = nil) Egi::Fedcloud::Cloudhound::Log.debug "[#{self.class}] Initializing with #{opts.inspect}" self.class.pem File.read(opts[:credentials]), password self.class.ssl_ca_path opts[:ca_path] self.class.debug_output $stderr if opts[:debug] end
Public Instance Methods
retrieve(url = '/')
click to toggle source
# File lib/egi/fedcloud/cloudhound/connector.rb, line 18 def retrieve(url = '/') Egi::Fedcloud::Cloudhound::Log.debug "[#{self.class}] Retrieving #{url.inspect}" response = self.class.get url raise "Failed to get a response from '#{url}' [#{response.code}]" unless response.code.between?(200,299) response.body end