class Commands::SSHCommand
Attributes
cmd[RW]
scp_opts[RW]
ssh_opts[RW]
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
Commands::AbstractSSHCommand::new
# File lib/commands.rb, line 633 def initialize(*args) super(*args) if @arg =~ /j-[A-Z0-9]{8,20}/ then commands.global_options[:jobflow] << @arg else self.cmd = @arg end end
Public Instance Methods
enact(client)
click to toggle source
Calls superclass method
Commands::AbstractSSHCommand#enact
# File lib/commands.rb, line 642 def enact(client) super(client) exec "ssh #{get_ssh_opts} -i #{key_pair_file} hadoop@#{hostname} #{get_field(:cmd, "")}" end