deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Fojtik (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DTACLOUD-237) Redirect page missing for two providers for star/stop operation
Date Thu, 14 Jun 2012 08:41:42 GMT

     [ https://issues.apache.org/jira/browse/DTACLOUD-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michal Fojtik resolved DTACLOUD-237.
------------------------------------

    Resolution: Fixed
      Assignee: Michal Fojtik

Patch on the list:

diff --git a/server/lib/deltacloud/helpers/deltacloud_helper.rb b/server/lib/deltacloud/helpers/deltacloud_helper.rb
index 6d8cb9b..de28590 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -110,25 +110,23 @@ module Deltacloud::Helpers
       end
 
       headers['X-Backend-Runtime'] = @benchmark.real.to_s
-      status 202
 
       if name == :destroy
-        respond_to do |format|
-          format.xml { return 204 }
-          format.json { return 204 }
-          format.html { return redirect(instances_url) }
+        response = respond_to do |format|
+          format.html { redirect(instances_url) }
         end
+        halt 204, response
       end
 
-      if @instance.class != Instance
-        response['Location'] = instance_url(params[:id])
-        halt
-      end
-
-      respond_to do |format|
-        format.xml { haml :"instances/show" }
-        format.html { haml :"instances/show" }
-        format.json {convert_to_json(:instance, @instance) }
+      unless @instance.class == Instance
+        redirect instance_url(params[:id])
+      else
+        response = respond_to do |format|
+          format.xml { haml :"instances/show" }
+          format.html { haml :"instances/show" }
+          format.json { xml_to_json("instances/show") }
+        end
+        halt 202, response
       end
     end
                
> Redirect page missing for two providers for star/stop operation
> ---------------------------------------------------------------
>
>                 Key: DTACLOUD-237
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-237
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Client (Ruby), Server
>         Environment: OS - Fedora 16, RHEL 6.2
> commit - 9e568c909956d34900a5e148487ce005b5758623
>            Reporter: Ramesh A
>            Assignee: Michal Fojtik
>            Priority: Minor
>
> Redirect page missing in the following areas
> 1. RHEM - Start / Stop an instance
> 2. VSPHERE - Stopping an instance

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message