Class: Actions::RemoteExecution::RunProxyCommand
- Inherits:
-
ProxyAction
- Object
- ProxyAction
- Actions::RemoteExecution::RunProxyCommand
- Includes:
- Dynflow::Action::Cancellable
- Defined in:
- app/lib/actions/remote_execution/run_proxy_command.rb
Instance Method Summary collapse
- #exit_status ⇒ Object
- #failed_run? ⇒ Boolean
- #on_data(data) ⇒ Object
- #plan(proxy, hostname, script, options = {}) ⇒ Object
- #proxy_action_name ⇒ Object
- #rescue_strategy ⇒ Object
Instance Method Details
#exit_status ⇒ Object
29 30 31 |
# File 'app/lib/actions/remote_execution/run_proxy_command.rb', line 29 def exit_status proxy_output && proxy_output[:exit_status] end |
#failed_run? ⇒ Boolean
25 26 27 |
# File 'app/lib/actions/remote_execution/run_proxy_command.rb', line 25 def failed_run? exit_status && proxy_output[:exit_status] != 0 end |
#on_data(data) ⇒ Object
16 17 18 19 |
# File 'app/lib/actions/remote_execution/run_proxy_command.rb', line 16 def on_data(data) super(data) error! _("Script execution failed") if failed_run? end |
#plan(proxy, hostname, script, options = {}) ⇒ Object
7 8 9 10 |
# File 'app/lib/actions/remote_execution/run_proxy_command.rb', line 7 def plan(proxy, hostname, script, = {}) = { :effective_user => nil }.merge() super(proxy, .merge(:hostname => hostname, :script => script)) end |
#proxy_action_name ⇒ Object
12 13 14 |
# File 'app/lib/actions/remote_execution/run_proxy_command.rb', line 12 def proxy_action_name 'Proxy::RemoteExecution::Ssh::CommandAction' end |
#rescue_strategy ⇒ Object
21 22 23 |
# File 'app/lib/actions/remote_execution/run_proxy_command.rb', line 21 def rescue_strategy ::Dynflow::Action::Rescue::Skip end |