Module: Fog::Rackspace::Queues::Common

Included in:
Mock, Real
Defined in:
lib/fog/rackspace/queues.rb

Instance Method Summary collapse

Instance Method Details

#apply_options(options) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/fog/rackspace/queues.rb', line 45

def apply_options(options)
  @rackspace_api_key = options[:rackspace_api_key]
  @rackspace_username = options[:rackspace_username]
  @rackspace_queues_client_id = options[:rackspace_queues_client_id] || Fog::UUID.uuid
  @rackspace_auth_url = options[:rackspace_auth_url]
  @rackspace_must_reauthenticate = false
  @connection_options = options[:connection_options] || {}
  @rackspace_region = options[:rackspace_region] || :ord

  unless v2_authentication?
    raise Fog::Errors::NotImplemented.new("V2 authentication required for Queues")
  end
end

#authenticate(options = {}) ⇒ Object



71
72
73
74
75
76
77
78
# File 'lib/fog/rackspace/queues.rb', line 71

def authenticate(options={})
  super({
    :rackspace_api_key  => @rackspace_api_key,
    :rackspace_username => @rackspace_username,
    :rackspace_auth_url => @rackspace_auth_url,
    :connection_options => @connection_options
  })
end

#client_idObject



80
81
82
# File 'lib/fog/rackspace/queues.rb', line 80

def client_id
  @rackspace_queues_client_id
end

#client_id=(client_id) ⇒ Object



84
85
86
# File 'lib/fog/rackspace/queues.rb', line 84

def client_id=(client_id)
  @rackspace_queues_client_id = client_id
end

#endpoint_uri(service_endpoint_url = nil) ⇒ Object



67
68
69
# File 'lib/fog/rackspace/queues.rb', line 67

def endpoint_uri(service_endpoint_url=nil)
  @uri = super(@rackspace_endpoint || service_endpoint_url, :rackspace_queues_url)
end

#regionObject



63
64
65
# File 'lib/fog/rackspace/queues.rb', line 63

def region
  @rackspace_region
end

#service_nameObject



59
60
61
# File 'lib/fog/rackspace/queues.rb', line 59

def service_name
  :cloudQueues
end