You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by lu...@redhat.com on 2011/05/05 00:42:07 UTC
[PATCH 5/5] load_balancers (register, unregister): respond with 204 for XML/JSON
From: David Lutterkort <lu...@redhat.com>
Signed-off-by: David Lutterkort <lu...@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