Class: Actions::RemoteExecution::RunProxyCommand

Inherits:
ProxyAction
  • Object
show all
Includes:
Dynflow::Action::Cancellable
Defined in:
app/lib/actions/remote_execution/run_proxy_command.rb

Instance Method Summary collapse

Instance Method Details

#exit_statusObject



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

Returns:

  • (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, options = {})
  options = { :effective_user => nil }.merge(options)
  super(proxy, options.merge(:hostname => hostname, :script => script))
end

#proxy_action_nameObject



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_strategyObject



21
22
23
# File 'app/lib/actions/remote_execution/run_proxy_command.rb', line 21

def rescue_strategy
  ::Dynflow::Action::Rescue::Skip
end