From e2ac439113d3df1f917c147fd36af50abaaacc3a Mon Sep 17 00:00:00 2001 From: Sergio Rubio Date: Fri, 7 Dec 2012 13:16:08 +0100 Subject: [PATCH] [openstack|identity] replace to_json with Fog::JSON.encode Refs #1338 --- lib/fog/openstack/requests/identity/create_tenant.rb | 4 +--- lib/fog/openstack/requests/identity/update_tenant.rb | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/fog/openstack/requests/identity/create_tenant.rb b/lib/fog/openstack/requests/identity/create_tenant.rb index 72fc7ae57..0d95047ec 100644 --- a/lib/fog/openstack/requests/identity/create_tenant.rb +++ b/lib/fog/openstack/requests/identity/create_tenant.rb @@ -7,9 +7,7 @@ module Fog :expects => [200], :method => 'POST', :path => "tenants", - :body => { - 'tenant' => attributes - }.to_json + :body => Fog::JSON.encode({ 'tenant' => attributes }) ) end # def create_tenant end # class Real diff --git a/lib/fog/openstack/requests/identity/update_tenant.rb b/lib/fog/openstack/requests/identity/update_tenant.rb index aacad5df8..c19d8c9d1 100644 --- a/lib/fog/openstack/requests/identity/update_tenant.rb +++ b/lib/fog/openstack/requests/identity/update_tenant.rb @@ -7,9 +7,7 @@ module Fog :expects => [200], :method => 'PUT', :path => "tenants/#{id}", - :body => { - 'tenant' => attributes - }.to_json + :body => Fog::JSON.encode({ 'tenant' => attributes }) ) end # def create_tenant end # class Real