You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2010/07/09 01:20:52 UTC
svn commit: r962070 - in /incubator/deltacloud/trunk/framework:
app/controllers/instances_controller.rb app/views/instances/show.html.erb
config/environment.rb config/routes.rb
Author: lutter
Date: Thu Jul 8 23:20:52 2010
New Revision: 962070
URL: http://svn.apache.org/viewvc?rev=962070&view=rev
Log:
Destroy, not delete
Modified:
incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb
incubator/deltacloud/trunk/framework/app/views/instances/show.html.erb
incubator/deltacloud/trunk/framework/config/environment.rb
incubator/deltacloud/trunk/framework/config/routes.rb
Modified: incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb?rev=962070&r1=962069&r2=962070&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb (original)
+++ incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb Thu Jul 8 23:20:52 2010
@@ -8,6 +8,7 @@ class InstancesController < ApplicationC
def index
build_filter( :id )
@instances = driver.instances( credentials, @filter )
+ @id = params[:id]
respond_to do |format|
format.html
@@ -71,7 +72,7 @@ class InstancesController < ApplicationC
end
def destroy
- driver.delete_instance( credentials, params[:id] )
+ driver.destroy_instance( credentials, params[:id] )
redirect_to :action=>:show
end
Modified: incubator/deltacloud/trunk/framework/app/views/instances/show.html.erb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/app/views/instances/show.html.erb?rev=962070&r1=962069&r2=962070&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/app/views/instances/show.html.erb (original)
+++ incubator/deltacloud/trunk/framework/app/views/instances/show.html.erb Thu Jul 8 23:20:52 2010
@@ -1,4 +1,5 @@
+
<h1><%= @instance.id %></h1>
<dl>
@@ -68,5 +69,4 @@
<% @instance.actions.each do |action| %>
<%= link_to action, send( "#{action}_instance_url", @instance.id ), :method=>:post %>
<% end %>
- <%= link_to 'delete', instance_url( @instance.id ), :method=>:delete %>
</div>
Modified: incubator/deltacloud/trunk/framework/config/environment.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/config/environment.rb?rev=962070&r1=962069&r2=962070&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/config/environment.rb (original)
+++ incubator/deltacloud/trunk/framework/config/environment.rb Thu Jul 8 23:20:52 2010
@@ -54,7 +54,6 @@ end
#DRIVER=:ec2
DRIVER=:mock
#DRIVER=:rhevm
->>>>>>> Add realms into the model
DRIVER_ROOT = File.dirname( __FILE__ ) + "/../../deltacloud-driver-#{DRIVER}"
$: << DRIVER_ROOT+'/lib'
Modified: incubator/deltacloud/trunk/framework/config/routes.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/config/routes.rb?rev=962070&r1=962069&r2=962070&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/config/routes.rb (original)
+++ incubator/deltacloud/trunk/framework/config/routes.rb Thu Jul 8 23:20:52 2010
@@ -11,7 +11,7 @@ ActionController::Routing::Routes.draw d
map.resources :images, :path_prefix=>'api'
map.resources :instances, :path_prefix=>'api',
:member=>{
- :delete=>:post,
+ :destroy=>:post,
:stop=>:post,
:start=>:post,
:reboot=>:post,