2010-03-19 18:29:42 -07:00
|
|
|
module Fog
|
|
|
|
module Rackspace
|
|
|
|
module Files
|
|
|
|
class Real
|
2009-10-11 13:37:25 -07: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 09:25:33 -07:00
|
|
|
#
|
2009-10-11 13:37:25 -07:00
|
|
|
# ==== Returns
|
2009-11-02 18:48:49 -08:00
|
|
|
# * response<~Excon::Response>:
|
2009-10-12 09:25:33 -07: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 13:37:25 -07:00
|
|
|
def get_containers(options = {})
|
|
|
|
response = storage_request(
|
|
|
|
:expects => [200, 204],
|
|
|
|
:method => 'GET',
|
|
|
|
:path => '',
|
2010-06-05 14:19:39 -07:00
|
|
|
:query => {'format' => 'json'}.merge!(options)
|
2009-10-11 13:37:25 -07:00
|
|
|
)
|
|
|
|
response
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2010-03-19 18:29:42 -07:00
|
|
|
class Mock
|
2009-10-11 13:37:25 -07:00
|
|
|
|
2010-02-01 22:53:18 -08:00
|
|
|
def get_containers(options = {})
|
2010-05-26 17:38:23 -07:00
|
|
|
Fog::Mock.not_implemented
|
2009-10-11 13:37:25 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|