Class: Oxidized::SCP

Inherits:
SSHBase show all
Defined in:
lib/oxidized/input/scp.rb

Constant Summary collapse

RESCUE_FAIL =
{
  Net::SCP::Error => :warn
}.freeze

Instance Attribute Summary

Attributes included from Input::CLI

#node

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SSHBase

#connect, #connected?, #disconnect, #make_ssh_opts, #make_ssh_proxy_command, #must_secure?

Methods inherited from Input

config_name, #config_name, to_sym, #to_sym

Methods included from Input::CLI

#connect_cli, #disconnect_cli, #get, #initialize, #login, #newline, #password, #post_login, #pre_logout, #username

Methods included from Config::Vars

#vars

Class Method Details

.rescue_failObject



16
17
18
# File 'lib/oxidized/input/scp.rb', line 16

def self.rescue_fail
  super.merge(RESCUE_FAIL)
end

Instance Method Details

#cmd(file) ⇒ Object



20
21
22
23
24
25
# File 'lib/oxidized/input/scp.rb', line 20

def cmd(file)
  logger.debug "SCP: #{file} @ #{@node.name}"
  Timeout.timeout(@node.timeout) do
    @ssh.scp.download!(file)
  end
end