deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r1133844 - /incubator/deltacloud/trunk/server/server.rb
Date Thu, 09 Jun 2011 12:56:00 GMT
Author: lutter
Date: Thu Jun  9 12:56:00 2011
New Revision: 1133844

URL: http://svn.apache.org/viewvc?rev=1133844&view=rev
Log:
load_balancers (register, unregister): respond with 204 for XML/JSON

Modified:
    incubator/deltacloud/trunk/server/server.rb

Modified: incubator/deltacloud/trunk/server/server.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/server.rb?rev=1133844&r1=1133843&r2=1133844&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/server.rb (original)
+++ incubator/deltacloud/trunk/server/server.rb Thu Jun  9 12:56:00 2011
@@ -327,7 +327,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
 
@@ -337,7 +341,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
 



Mime
View raw message