Parent

Class/Module Index [+]

Quicksearch

Fog::Rackspace::Service

Public Instance Methods

authenticate(options={}) click to toggle source
# File lib/fog/rackspace/service.rb, line 28
def authenticate(options={})
   self.send authentication_method, options
end
endpoint_uri(service_endpoint=nil, endpoint_name=nil) click to toggle source
# File lib/fog/rackspace/service.rb, line 12
def endpoint_uri(service_endpoint=nil, endpoint_name=nil)
  return @uri if @uri

  url = service_endpoint

  unless url
    if v1_authentication?
      raise "Service Endpoint must be specified via #{endpoint_name} parameter"
    else
      url = endpoint_uri_v2
    end
  end

  @uri = URI.parse url
end
region() click to toggle source
# File lib/fog/rackspace/service.rb, line 8
def region
  raise Fog::Errors::NotImplemented.new("Please implement the #region method")
end
request(params, parse_json = true) click to toggle source
# File lib/fog/rackspace/service.rb, line 39
def request(params, parse_json = true)
  first_attempt = true
  begin
    response = @connection.request(request_params(params))
  rescue Excon::Errors::Unauthorized => error
    raise error unless first_attempt
    first_attempt = false
    authenticate
    retry
  end

  process_response(response) if parse_json
  response
end
request_without_retry(params, parse_json = true) click to toggle source
# File lib/fog/rackspace/service.rb, line 32
def request_without_retry(params, parse_json = true)
  response = @connection.request(request_params(params))

  process_response(response) if parse_json
  response
end
service_name() click to toggle source
# File lib/fog/rackspace/service.rb, line 4
def service_name
  raise Fog::Errors::NotImplemented.new("Please implement the #service_name method")
end
service_net?() click to toggle source
# File lib/fog/rackspace/service.rb, line 54
def service_net?
  false
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.