From c4ecfc93577f462cf55cb57ba48ddb80f9fee7ee Mon Sep 17 00:00:00 2001 From: Rupak Ganguly Date: Fri, 19 Oct 2012 01:35:06 -0400 Subject: [PATCH] Fix mock for put_container to reflect new acl changes. --- lib/fog/hp/requests/storage/put_container.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fog/hp/requests/storage/put_container.rb b/lib/fog/hp/requests/storage/put_container.rb index b3d4235fe..7bbb95d62 100644 --- a/lib/fog/hp/requests/storage/put_container.rb +++ b/lib/fog/hp/requests/storage/put_container.rb @@ -22,16 +22,16 @@ module Fog class Mock # :nodoc:all def put_container(container_name, options = {}) - acl = options['X-Container-Read'] || 'private' - if !['private', 'public-read'].include?(acl) - #raise Excon::Errors::BadRequest.new('invalid X-Container-Read') - else - self.data[:acls][:container][container_name] = self.class.acls(acl) + read_h = options['X-Container-Read'] || '' + write_h = options['X-Container-Write'] || '' + unless options + read_acl, write_acl = self.class.header_to_perm_acl(read_h, write_h) + self.data[:acls][:container][container_name] = {:read_acl => read_acl, :write_acl => write_acl} end response = Excon::Response.new container = { - :objects => {}, + :objects => {} } if self.data[:containers][container_name] response.status = 202