Displaying 5 results from an estimated 5 matches for "action_args".
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 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
0
[PATCH server] Add svc_vm_actions method to VmService.
...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))
@task = @vm.queue_actio...
2009 May 13
1
[PATCH server] Cloud UI V1 (readonly).
...t]
+ 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 @@
+#
+# Copyright (C) 2009 Red Hat, Inc.
+# Written by Jason Guidi...