Skip to content
Browse files

[sync] container metadata sync_to sync_key

  • Loading branch information...
1 parent eaaad2c commit ad4c9980b36d9ccc78432c0887739142c10656f2 @portertech committed Jul 30, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/cloudfiles/container.rb
View
10 lib/cloudfiles/container.rb
@@ -45,7 +45,15 @@ def container_metadata
response = SwiftClient.head_container(self.connection.storageurl, self.connection.authtoken, escaped_name)
resphash = {}
response.to_hash.select { |k,v| k.match(/^x-container-meta/) }.each { |x| resphash[x[0]] = x[1].to_s }
- {:bytes => response["x-container-bytes-used"].to_i, :count => response["x-container-object-count"].to_i, :metadata => resphash, :container_read => response["x-container-read"], :container_write => response["x-container-write"]}
+ {
+ :bytes => response["x-container-bytes-used"].to_i,
+ :count => response["x-container-object-count"].to_i,
+ :metadata => resphash,
+ :container_read => response["x-container-read"],
+ :container_write => response["x-container-write"],
+ :sync_to => response['x-container-sync-to'],
+ :sync_key => response['x-container-sync-key']
+ }
rescue ClientException => e
raise CloudFiles::Exception::NoSuchContainer, "Container #{@name} does not exist" unless (e.status.to_s =~ /^20/)
end

0 comments on commit ad4c998

Please sign in to comment.
Something went wrong with that request. Please try again.