incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 5/5] load_balancers (register, unregister): respond with 204 for XML/JSON
Date Wed, 04 May 2011 22:42:07 GMT
From: David Lutterkort <lutter@redhat.com>


Signed-off-by: David Lutterkort <lutter@redhat.com>
---
 server/server.rb |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/server/server.rb b/server/server.rb
index c48315b..89c3274 100644
--- a/server/server.rb
+++ b/server/server.rb
@@ -323,7 +323,11 @@ collection :load_balancers do
     param :instance_id, :string,  :required
     control do
       driver.lb_register_instance(credentials, params)
-      redirect(load_balancer_url(params[:id]))
+      respond_to do |format|
+        format.xml { 204 }
+        format.json { 204 }
+        format.html { redirect(load_balancer_url(params[:id])) }
+      end
     end
   end
 
@@ -333,7 +337,11 @@ collection :load_balancers do
     param :instance_id, :string,  :required
     control do
       driver.lb_unregister_instance(credentials, params)
-      redirect(load_balancer_url(params[:id]))
+      respond_to do |format|
+        format.xml { 204 }
+        format.json { 204 }
+        format.html { redirect(load_balancer_url(params[:id])) }
+      end
     end
   end
 
-- 
1.7.4.4


Mime
View raw message