From 7c2565720c898b0573a5a30db958d8a78577f4a4 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sat, 1 Mar 2014 11:35:17 +0200 Subject: Add Model#output method Outputs about what we've seen last in input class. Quite dirty in telnet, so not sure I'm going to support it. Let's see if there is use-case for it. --- lib/oxidized/input/ssh.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/input/ssh.rb') diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 5c9a4f0..24401dd 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -17,7 +17,7 @@ module Oxidized def connect node @node = node @output = '' - @node.model.cfg['ssh'].each { |cb| instance_exec &cb } + @node.model.cfg['ssh'].each { |cb| instance_exec(&cb) } secure = CFG.input[:ssh][:secure] @ssh = Net::SSH.start @node.ip, @node.auth[:username], :password => @node.auth[:password], :timeout => CFG.timeout, @@ -39,6 +39,10 @@ module Oxidized @ses.send_data data end + def output + @output + end + private def disconnect -- cgit v1.2.1