2010-03-19 21:29:42 -04:00
|
|
|
module Fog
|
|
|
|
module Rackspace
|
2010-09-08 16:50:23 -04:00
|
|
|
class Storage
|
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)
|
|
|
|
response = storage_request(
|
|
|
|
:expects => 204,
|
|
|
|
:method => 'HEAD',
|
|
|
|
:path => container,
|
2010-06-05 17:19:39 -04:00
|
|
|
:query => {'format' => 'json'}
|
2009-10-26 20:56:08 -04:00
|
|
|
)
|
|
|
|
response
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2010-03-19 21:29:42 -04:00
|
|
|
class Mock
|
2009-10-26 20:56:08 -04:00
|
|
|
|
2010-02-02 01:53:18 -05:00
|
|
|
def head_container(container)
|
2010-05-26 20:38:23 -04:00
|
|
|
Fog::Mock.not_implemented
|
2009-10-26 20:56:08 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|