diff --git a/lib/fog/fogdocker/compute.rb b/lib/fog/fogdocker/compute.rb index bee71517f..615799ac5 100644 --- a/lib/fog/fogdocker/compute.rb +++ b/lib/fog/fogdocker/compute.rb @@ -49,6 +49,10 @@ module Fog hash.inject({}){ |h, v| h.merge! downcase_hash_keys(v[-1], k + [v[0]]) } end + def camelize_hash_keys(hash) + Hash[ hash.map {|k, v| [k.to_s.camelize, v] }] + end + end end end diff --git a/lib/fog/fogdocker/requests/compute/container_create.rb b/lib/fog/fogdocker/requests/compute/container_create.rb index 30a94e806..16f41fc5a 100644 --- a/lib/fog/fogdocker/requests/compute/container_create.rb +++ b/lib/fog/fogdocker/requests/compute/container_create.rb @@ -27,7 +27,7 @@ module Fog #} class Real def container_create(attrs) - downcase_hash_keys Docker::Container.create(attrs).info + downcase_hash_keys Docker::Container.create(camelize_hash_keys(attrs)).info end end diff --git a/lib/fog/fogdocker/requests/compute/image_create.rb b/lib/fog/fogdocker/requests/compute/image_create.rb index 91ab72f07..cbe00169c 100644 --- a/lib/fog/fogdocker/requests/compute/image_create.rb +++ b/lib/fog/fogdocker/requests/compute/image_create.rb @@ -4,7 +4,7 @@ module Fog class Real def image_create(attrs) - downcase_hash_keys Docker::Image.create(attrs).info + downcase_hash_keys Docker::Image.create(camelize_hash_keys(attrs)).info end end