search for: svc_destroy

Displaying 5 results from an estimated 5 matches for "svc_destroy".

Did you mean: sem_destroy
2009 Aug 18
1
[PATCH server] Add of a button destroy for disabled hosts.
.../src/app/controllers/host_controller.rb index 20e9fca..3ecb132 100644 --- a/src/app/controllers/host_controller.rb +++ b/src/app/controllers/host_controller.rb @@ -80,6 +80,11 @@ class HostController < ApplicationController :success => true } end + + def destroy + alert = svc_destroy(params[:id]) + render :json => { :object => "host", :success => true, :alert => alert } + end def enable svc_enable(params[:id], "enabled") diff --git a/src/app/services/host_service.rb b/src/app/services/host_service.rb index 4ace9fb..2482f93 100644 -...
2009 May 20
1
[PATCH server] don't add nil key to failures hash for PartialSuccessError handling.
.../controllers/resources_controller.rb b/src/app/controllers/resources_controller.rb index 6990df7..efd3cb6 100644 --- a/src/app/controllers/resources_controller.rb +++ b/src/app/controllers/resources_controller.rb @@ -80,10 +80,9 @@ class ResourcesController < PoolController begin svc_destroy(pool_id) successes << @pool - rescue PermissionError => perm_error - failures[@pool] = perm_error.message + # PermissionError expected rescue Exception => ex - failures[@pool] = ex.message + failures[@pool.nil? ? pool_id : @pool] = ex.messa...
2009 May 15
0
[PATCH server] final cleanup for service layer refactoring.
...a/src/app/controllers/network_controller.rb b/src/app/controllers/network_controller.rb index 5af0a73..9066724 100644 --- a/src/app/controllers/network_controller.rb +++ b/src/app/controllers/network_controller.rb @@ -175,13 +175,4 @@ class NetworkController < ApplicationController alert = svc_destroy_bonding(params[:id]) render :json => {:object => "bonding", :success => true, :alert => alert} end - - protected - # FIXME: remove these when service transition is complete. these are here - # to keep from running permissions checks and other setup steps twice - de...
2009 May 19
1
re-sending outstanding controller refactoring patches after rebase
I've rebased the patch series to the current next branch and am sending them again.
2009 May 15
0
[PATCH server] use service layer for Network controller.
...s => false, - :errors => - @network.errors.localize_error_messages.to_a } + def delete + network_ids = params[:network_ids].split(",") + successes = [] + failures = {} + network_ids.each do |network_id| + begin + svc_destroy(network_id) + successes << @network + rescue PermissionError => perm_error + failures[@network] = perm_error.message + rescue ActionError => ex + failures[@network] = ex.message + rescue Exception => ex + failures[@network] = ex.message +...