From 57a8f4bc04b4f87ad0d7028dcbf29b96d49eaffd Mon Sep 17 00:00:00 2001
From: Saku Ytti <saku@ytti.fi>
Date: Mon, 14 Apr 2014 16:28:23 +0300
Subject: Use 'asetus' for configuration files

Main benefits
 a) we get support for system wide configs
 b) we don't use symbols in config file, they're confusing to
 non-rubyist
---
 lib/oxidized/input/ssh.rb    | 14 +++++++-------
 lib/oxidized/input/telnet.rb |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

(limited to 'lib/oxidized/input')

diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb
index dae1d74..570f8a8 100644
--- a/lib/oxidized/input/ssh.rb
+++ b/lib/oxidized/input/ssh.rb
@@ -12,14 +12,14 @@ module Oxidized
         Net::SSH::AuthenticationFailed,
       ],
     }
-    include CLI
+    include Input::CLI
     class NoShell < OxidizedError; end
 
     def connect node
       @node       = node
       @output     = ''
       @node.model.cfg['ssh'].each { |cb| instance_exec(&cb) }
-      secure = CFG.input[:ssh][:secure]
+      secure = CFG.input.ssh.secure
       @ssh = Net::SSH.start @node.ip, @node.auth[:username],
                             :password => @node.auth[:password], :timeout => CFG.timeout,
                             :paranoid => secure
@@ -64,14 +64,14 @@ module Oxidized
 
     def shell_open ssh
       @ses = ssh.open_channel do |ch|
-        ch.on_data do |ch, data|
+        ch.on_data do |_ch, data|
           @output << data
           @output = @node.model.expects @output
         end
-        ch.request_pty do |ch, success|
-          raise NoShell, "Can't get PTY" unless success
-          ch.send_channel_request 'shell' do |ch, success|
-            raise NoShell, "Can't get shell" unless success
+        ch.request_pty do |_ch, success_pty|
+          raise NoShell, "Can't get PTY" unless success_pty
+          ch.send_channel_request 'shell' do |_ch, success_shell|
+            raise NoShell, "Can't get shell" unless success_shell
           end
         end
       end
diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb
index 4e80ceb..218b13c 100644
--- a/lib/oxidized/input/telnet.rb
+++ b/lib/oxidized/input/telnet.rb
@@ -3,7 +3,7 @@ module Oxidized
   require 'oxidized/input/cli'
   class Telnet < Input
     RescueFail = {}
-    include CLI
+    include Input::CLI
     attr_reader :telnet
 
     def connect node
-- 
cgit v1.2.3