class Proxy::RemoteExecution::Ssh::Dispatcher::Command
command comming from action
Attributes
effective_user[R]
effective_user_method[R]
host[R]
host_public_key[R]
id[R]
script[R]
ssh_port[R]
ssh_user[R]
suspended_action[R]
Public Class Methods
new(data)
click to toggle source
# File lib/smart_proxy_remote_execution_ssh_core/dispatcher.rb, line 14 def initialize(data) validate!(data) @id = data[:id] @host = data[:host] @ssh_user = data[:ssh_user] @ssh_port = data[:ssh_port] @effective_user = data[:effective_user] @effective_user_method = data[:effective_user_method] || 'su' @script = data[:script] @host_public_key = data[:host_public_key] @suspended_action = data[:suspended_action] end
Public Instance Methods
validate!(data)
click to toggle source
# File lib/smart_proxy_remote_execution_ssh_core/dispatcher.rb, line 28 def validate!(data) required_fields = [:id, :host, :ssh_user, :script, :suspended_action] missing_fields = required_fields.find_all { |f| !data[f] } raise ArgumentError, "Missing fields: #{missing_fields}" unless missing_fields.empty? end