search for: svc_vm_action

Displaying 8 results from an estimated 8 matches for "svc_vm_action".

Did you mean: svc_vm_actions
2009 Jun 29
0
[PATCH server] Add svc_vm_actions method to VmService.
...end of file diff --git a/src/app/services/vm_service.rb b/src/app/services/vm_service.rb index 3d9777c..a78e17d 100644 --- a/src/app/services/vm_service.rb +++ b/src/app/services/vm_service.rb @@ -211,13 +211,42 @@ module VmService # <tt>VmTask.action_privilege(@action)</tt> def svc_vm_action(id, vm_action, action_args) @vm = Vm.find(id) + unless @vm.valid_action?(vm_action) + raise ActionError.new("#{vm_action} is an invalid action.") + end authorized!(VmTask.action_privilege(vm_action), VmTask.action_privilege_object(vm_action, at vm))...
2009 Jun 22
2
Patch series for Cloud Vm Actions
The following two patches should be applied in the order: * [PATCH server] Add svc_vm_actions method to VmService. * [PATCH server] Cloud UI layer to initiate actions on vms. The service layer patch should work fine on its own (and not break anything), but cloud patch relies on service being there.
2009 Jun 29
2
One more fix
This resend includes the rebase, but fixes a problem I just noticed with nil/empty checks.
2009 Jun 29
2
Resend of Cloud UI/service patches
This is a resend of the 2-patch series from a week or so ago, needed to be rebased due to some commits on next
2009 Jul 01
1
[PATCH server] fixed expected status messages that were failing unit/functional tests.
...mServiceTest < ActiveSupport::TestCase # (should be the same message if one or more, so we have one test for # each of those cases) def test_success_message_from_single_vm - assert_equal("shutdown_vm successful.", + assert_equal("shutdown_vm submitted.", svc_vm_actions(vms(:production_mysqld_vm).id, 'shutdown_vm', nil)) end @@ -92,7 +92,7 @@ class VmServiceTest < ActiveSupport::TestCase # (should be the same message if one or more, so we have one test for # each of those cases) def test_success_message_for_multiple_vms - assert_equal(...
2009 Sep 16
2
[Fwd: Re: [PATCH node-image] keep NIC and HBA firmwares]
Forwarding to the list for Jay or Scott to have a look. Ignazio, do you see any more details (traceback or something) in the rails log? -------------- next part -------------- An embedded message was scrubbed... From: ignazio.cassano at provincia.torino.it Subject: Re: [Ovirt-devel] [PATCH node-image] keep NIC and HBA firmwares Date: Wed, 16 Sep 2009 16:48:47 +0200 Size: 4031 URL:
2009 May 15
0
[PATCH server] final cleanup for service layer refactoring.
...index 00cf982..8930a4b 100644 --- a/src/app/services/vm_resource_pool_service.rb +++ b/src/app/services/vm_resource_pool_service.rb @@ -73,7 +73,6 @@ module VmResourcePoolService # permission is action-specific as determined by # <tt>VmTask.action_privilege(@action)</tt> def svc_vm_actions(pool_id, vm_action, vm_ids) - # from before_filter @pool = VmResourcePool.find(pool_id) @parent = @pool.parent @action = vm_action diff --git a/src/app/services/vm_service.rb b/src/app/services/vm_service.rb index fb58b51..4c29bcf 100644 --- a/src/app/services/vm_service.rb +++ b...
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
...ect. + def handle_form + case params[:submit_for_list] + when "Show Selected" + params.delete(:submit_for_list) + redirect_to :action => "index", :params => params + return +# Do this if we have submitted an action on one or more vms. +# svc_vm_action(params[:ids], params[:vm_action], params[:action_args]) + end + end + +end diff --git a/src/app/helpers/cloud/cloud_helper.rb b/src/app/helpers/cloud/cloud_helper.rb new file mode 100644 index 0000000..9ec71da --- /dev/null +++ b/src/app/helpers/cloud/cloud_helper.rb @@ -0,0 +1,21 @@ +# +# Copy...