From 7b9394408022f007af4792463728e2c5e8fd2b12 Mon Sep 17 00:00:00 2001 From: Max Mudde Date: Tue, 7 Mar 2017 08:12:42 +0100 Subject: Added lines to ignore for SAOS7 devics. --- lib/oxidized/model/saos.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/saos.rb b/lib/oxidized/model/saos.rb index 649daa7..5a4e79e 100644 --- a/lib/oxidized/model/saos.rb +++ b/lib/oxidized/model/saos.rb @@ -2,7 +2,7 @@ class SAOS < Oxidized::Model # Ciena SAOS switch # used for 6.x devices - + comment '! ' cmd :all do |cfg| @@ -11,6 +11,7 @@ class SAOS < Oxidized::Model cmd 'configuration show' do |cfg| cfg.gsub! /^! Created: [^\n]*\n/, '' + cfg.gsub! /^! On terminal: [^\n]*\n/, '' cfg end -- cgit v1.2.1 From f9cc5df2661eb4fc073c041f298073b89f91210b Mon Sep 17 00:00:00 2001 From: Arnoud Vermeer Date: Thu, 16 Mar 2017 10:56:20 +0100 Subject: Ignore the host key checking --- lib/oxidized/input/ssh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 9a5c508..edde6b7 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -25,7 +25,7 @@ module Oxidized @log = File.open(Oxidized::Config::Log + "/#{@node.ip}-ssh", 'w') if Oxidized.config.input.debug? port = vars(:ssh_port) || 22 if proxy_host = vars(:ssh_proxy) - proxy = Net::SSH::Proxy::Command.new("ssh #{proxy_host} -W %h:%p") + proxy = Net::SSH::Proxy::Command.new("ssh -o StrictHostKeyChecking=no #{proxy_host} -W %h:%p") end ssh_opts = { :port => port.to_i, -- cgit v1.2.1 From d21aeefb6ad3fca04d25a7af57fd9bd350a18fd8 Mon Sep 17 00:00:00 2001 From: Arnoud Vermeer Date: Thu, 16 Mar 2017 19:28:38 +0100 Subject: Add option to disable StrictHostKeyChecking --- lib/oxidized/input/ssh.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index edde6b7..858d5cd 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -25,7 +25,10 @@ module Oxidized @log = File.open(Oxidized::Config::Log + "/#{@node.ip}-ssh", 'w') if Oxidized.config.input.debug? port = vars(:ssh_port) || 22 if proxy_host = vars(:ssh_proxy) - proxy = Net::SSH::Proxy::Command.new("ssh -o StrictHostKeyChecking=no #{proxy_host} -W %h:%p") + proxy_command = "ssh " + proxy_command += "-o StrictHostKeyChecking=no " unless secure + proxy_command += "#{proxy_host} -W %h:%p" + proxy = Net::SSH::Proxy::Command.new(proxy_command) end ssh_opts = { :port => port.to_i, -- cgit v1.2.1 From 623d538a0f8744a11ba285ea060e62ea71011c79 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Thu, 16 Mar 2017 01:34:12 -0300 Subject: Support for Cisco NGA. --- lib/oxidized/model/cisconga.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/oxidized/model/cisconga.rb (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/cisconga.rb b/lib/oxidized/model/cisconga.rb new file mode 100644 index 0000000..37cb4e4 --- /dev/null +++ b/lib/oxidized/model/cisconga.rb @@ -0,0 +1,19 @@ +class CiscoNGA < Oxidized::Model + + comment '# ' + prompt /([\w.@-]+[#>]\s?)$/ + + cmd 'show version' do |cfg| + comment cfg + end + + cmd 'show configuration' do |cfg| + comment cfg + end + + cfg :ssh do + post_login 'terminal length 0' + pre_logout 'exit' + end + +end -- cgit v1.2.1 From ba150fa65989bc12db7cc9af3d6d934b07a40c84 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Thu, 16 Mar 2017 01:52:40 -0300 Subject: Do not comment out result for show configuration. --- lib/oxidized/model/cisconga.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/cisconga.rb b/lib/oxidized/model/cisconga.rb index 37cb4e4..73fb51c 100644 --- a/lib/oxidized/model/cisconga.rb +++ b/lib/oxidized/model/cisconga.rb @@ -8,7 +8,7 @@ class CiscoNGA < Oxidized::Model end cmd 'show configuration' do |cfg| - comment cfg + cfg end cfg :ssh do -- cgit v1.2.1 From 581f3dc8c170f218abe2e8e00835910fe271485d Mon Sep 17 00:00:00 2001 From: Schylar Utley Date: Wed, 22 Mar 2017 11:40:31 -0500 Subject: Fix alvarion block issue --- lib/oxidized/model/alvarion.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/alvarion.rb b/lib/oxidized/model/alvarion.rb index 3c762de..7a4dcc7 100644 --- a/lib/oxidized/model/alvarion.rb +++ b/lib/oxidized/model/alvarion.rb @@ -8,6 +8,8 @@ class Alvarion < Oxidized::Model end - cfg :tftp {} + cfg :tftp do + + end end -- cgit v1.2.1