2010-03-19 21:29:42 -04:00
|
|
|
module Fog
|
2011-06-15 17:26:43 -04:00
|
|
|
module Storage
|
|
|
|
class Rackspace
|
2010-03-19 21:29:42 -04:00
|
|
|
class Real
|
2009-10-26 20:56:08 -04:00
|
|
|
|
|
|
|
# List number of objects and total bytes stored
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * container<~String> - Name of container to retrieve info for
|
|
|
|
#
|
|
|
|
# ==== Returns
|
2009-11-02 21:48:49 -05:00
|
|
|
# * response<~Excon::Response>:
|
2009-10-26 20:56:08 -04:00
|
|
|
# * headers<~Hash>:
|
|
|
|
# * 'X-Container-Object-Count'<~String> - Count of containers
|
|
|
|
# * 'X-Container-Bytes-Used'<~String> - Bytes used
|
|
|
|
def head_container(container)
|
2011-06-15 17:26:43 -04:00
|
|
|
request(
|
2009-10-26 20:56:08 -04:00
|
|
|
:expects => 204,
|
|
|
|
:method => 'HEAD',
|
2011-03-23 20:54:37 -04:00
|
|
|
:path => URI.escape(container),
|
2010-06-05 17:19:39 -04:00
|
|
|
:query => {'format' => 'json'}
|
2009-10-26 20:56:08 -04:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|