You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by Michal Fojtik <mf...@redhat.com> on 2012/09/05 12:57:52 UTC

Re: [PATCH] Remove forgotten invocations of 'convert_to_json'

On 06/09/12 10:29 +0300, marios@redhat.com wrote:

ACK.

   -- Michal

>From: marios <ma...@redhat.com>
>
>
>Signed-off-by: marios <ma...@redhat.com>
>---
> server/lib/deltacloud/collections/addresses.rb       | 2 +-
> server/lib/deltacloud/collections/firewalls.rb       | 4 ++--
> server/lib/deltacloud/collections/keys.rb            | 2 +-
> server/lib/deltacloud/collections/load_balancers.rb  | 2 +-
> server/lib/deltacloud/collections/storage_volumes.rb | 8 ++++----
> 5 files changed, 9 insertions(+), 9 deletions(-)
>
>diff --git a/server/lib/deltacloud/collections/addresses.rb b/server/lib/deltacloud/collections/addresses.rb
>index c43f478..622a949 100644
>--- a/server/lib/deltacloud/collections/addresses.rb
>+++ b/server/lib/deltacloud/collections/addresses.rb
>@@ -41,7 +41,7 @@ module Deltacloud::Collections
>           respond_to do |format|
>             format.xml  { haml :"addresses/show", :ugly => true }
>             format.html { haml :"addresses/_address", :layout => false }
>-            format.json { convert_to_json(:address, @address) }
>+            format.json { xml_to_json("addresses/show") }
>           end
>         end
>       end
>diff --git a/server/lib/deltacloud/collections/firewalls.rb b/server/lib/deltacloud/collections/firewalls.rb
>index 42dc4ad..0046cf3 100644
>--- a/server/lib/deltacloud/collections/firewalls.rb
>+++ b/server/lib/deltacloud/collections/firewalls.rb
>@@ -66,7 +66,7 @@ module Deltacloud::Collections
>           respond_to do |format|
>             format.xml  { haml :"firewalls/show" }
>             format.html { haml :"firewalls/show" }
>-            format.json { convert_to_json(:firewall, @firewall) }
>+            format.json { xml_to_json("firewalls/show") }
>           end
>         end
>       end
>@@ -109,7 +109,7 @@ module Deltacloud::Collections
>           respond_to do |format|
>             format.xml  { haml :"firewalls/show" }
>             format.html { haml :"firewalls/show" }
>-            format.json { convert_to_json(:firewall, @firewall) }
>+            format.json { xml_to_json("firewalls/show") }
>           end
>         end
>       end
>diff --git a/server/lib/deltacloud/collections/keys.rb b/server/lib/deltacloud/collections/keys.rb
>index c59eb15..bb9859d 100644
>--- a/server/lib/deltacloud/collections/keys.rb
>+++ b/server/lib/deltacloud/collections/keys.rb
>@@ -42,7 +42,7 @@ module Deltacloud::Collections
>           respond_to do |format|
>             format.xml  { haml :"keys/show", :ugly => true }
>             format.html { haml :"keys/show" }
>-            format.json { convert_to_json(:key, @key)}
>+            format.json { xml_to_json("keys/show")}
>           end
>         end
>       end
>diff --git a/server/lib/deltacloud/collections/load_balancers.rb b/server/lib/deltacloud/collections/load_balancers.rb
>index ce2c42a..c26db91 100644
>--- a/server/lib/deltacloud/collections/load_balancers.rb
>+++ b/server/lib/deltacloud/collections/load_balancers.rb
>@@ -53,7 +53,7 @@ module Deltacloud::Collections
>           response['Location'] = load_balancer_url(@load_balancer.id)
>           respond_to do |format|
>             format.xml  { haml :"load_balancers/show" }
>-            format.json { convert_to_json(:load_balancer, @load_balancer) }
>+            format.json { xml_to_json("load_balancers/show")}
>             format.html { redirect load_balancer_url(@load_balancer.id)}
>           end
>         end
>diff --git a/server/lib/deltacloud/collections/storage_volumes.rb b/server/lib/deltacloud/collections/storage_volumes.rb
>index dde5e32..99f99f2 100644
>--- a/server/lib/deltacloud/collections/storage_volumes.rb
>+++ b/server/lib/deltacloud/collections/storage_volumes.rb
>@@ -48,7 +48,7 @@ module Deltacloud::Collections
>           respond_to do |format|
>             format.xml  { haml :"storage_volumes/show" }
>             format.html { haml :"storage_volumes/show" }
>-            format.json { convert_to_json(:storage_volume, @storage_volume) }
>+            format.json { xml_to_json("storage_volumes/show") }
>           end
>         end
>       end
>@@ -62,7 +62,7 @@ module Deltacloud::Collections
>           respond_to do |format|
>             format.html { redirect(storage_volume_url(params[:id]))}
>             format.xml  { haml :"storage_volumes/show" }
>-            format.json { convert_to_json(:storage_volume, @storage_volume) }
>+            format.json { xml_to_json("storage_volumes/show")}
>           end
>         end
>       end
>@@ -70,14 +70,14 @@ module Deltacloud::Collections
>       action :detach, :with_capability => :detach_storage_volume do
>         control do
>           volume = driver.storage_volume(credentials, :id => params[:id])
>-          @storage_volume =  driver.detach_storage_volume(credentials, :id => volume.id,
>+          @storage_volume =  driver.detach_storage_volume(credentials, :id => volume.id,
>                                                           :instance_id => volume.instance_id,
>                                                           :device => volume.device)
>           status 202
>           respond_to do |format|
>             format.html { redirect(storage_volume_url(params[:id]))}
>             format.xml  { haml :"storage_volumes/show" }
>-            format.json { convert_to_json(:storage_volume, @storage_volume) }
>+            format.json {  xml_to_json("storage_volumes/show") }
>           end
>         end
>       end
>-- 
>1.7.11.4
>