2010-03-20 01:29:42 +00:00
|
|
|
module Fog
|
|
|
|
module Rackspace
|
2010-09-08 20:50:23 +00:00
|
|
|
class Storage
|
2010-03-20 01:29:42 +00:00
|
|
|
class Real
|
2009-10-11 20:37:25 +00:00
|
|
|
|
|
|
|
# List existing storage containers
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * options<~Hash>:
|
|
|
|
# * 'limit'<~Integer> - Upper limit to number of results returned
|
|
|
|
# * 'marker'<~String> - Only return objects with name greater than this value
|
2009-10-12 16:25:33 +00:00
|
|
|
#
|
2009-10-11 20:37:25 +00:00
|
|
|
# ==== Returns
|
2009-11-03 02:48:49 +00:00
|
|
|
# * response<~Excon::Response>:
|
2009-10-12 16:25:33 +00:00
|
|
|
# * body<~Array>:
|
|
|
|
# * container<~Hash>:
|
|
|
|
# * 'bytes'<~Integer>: - Number of bytes used by container
|
|
|
|
# * 'count'<~Integer>: - Number of items in container
|
|
|
|
# * 'name'<~String>: - Name of container
|
2009-10-11 20:37:25 +00:00
|
|
|
def get_containers(options = {})
|
2011-01-26 19:15:34 +00:00
|
|
|
options = options.reject {|key, value| value.nil?}
|
2010-11-01 18:50:30 +00:00
|
|
|
response = request(
|
2009-10-11 20:37:25 +00:00
|
|
|
:expects => [200, 204],
|
|
|
|
:method => 'GET',
|
|
|
|
:path => '',
|
2010-06-05 21:19:39 +00:00
|
|
|
:query => {'format' => 'json'}.merge!(options)
|
2009-10-11 20:37:25 +00:00
|
|
|
)
|
|
|
|
response
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|