2011-02-05 17:06:44 -05:00
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class SQS
|
|
|
|
class Real
|
|
|
|
|
|
|
|
require 'fog/aws/parsers/sqs/list_queues'
|
|
|
|
|
2011-07-19 16:10:26 -04:00
|
|
|
# List queues
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * options<~Hash>:
|
|
|
|
# * QueueNamePrefix<~String> - String used to filter results to only those with matching prefixes
|
|
|
|
#
|
|
|
|
# ==== See Also
|
|
|
|
# http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/Query_QueryListQueues.html
|
|
|
|
#
|
|
|
|
|
|
|
|
def list_queues(options = {})
|
2011-02-05 17:06:44 -05:00
|
|
|
request({
|
|
|
|
'Action' => 'ListQueues',
|
|
|
|
:parser => Fog::Parsers::AWS::SQS::ListQueues.new
|
2011-07-19 16:10:26 -04:00
|
|
|
}.merge!(options))
|
2011-02-05 17:06:44 -05:00
|
|
|
end
|
|
|
|
end
|
2011-09-18 16:00:58 -04:00
|
|
|
|
|
|
|
class Mock
|
|
|
|
def list_queues(options = {})
|
|
|
|
Excon::Response.new.tap do |response|
|
|
|
|
response.status = 200
|
|
|
|
|
|
|
|
response.body = {
|
|
|
|
'ResponseMetadata' => {
|
|
|
|
'RequestId' => Fog::AWS::Mock.request_id
|
|
|
|
},
|
|
|
|
'QueueUrls' => data[:queues].keys
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2011-02-05 17:06:44 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|