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(-) 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 efdc21a9e70b8f45fd779a0054a86fca3fc884ac Mon Sep 17 00:00:00 2001 From: Max Mudde Date: Tue, 7 Mar 2017 08:14:50 +0100 Subject: Fixed Ciena typo in Readme.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f3defc..3ba12bb 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen * Check Point * [GaiaOS](lib/oxidized/model/gaiaos.rb) * Ciena - * [SOAS](lib/oxidized/model/saos.rb) + * [SAOS](lib/oxidized/model/saos.rb) * Cisco * [AireOS](lib/oxidized/model/aireos.rb) * [ASA](lib/oxidized/model/asa.rb) -- 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. --- README.md | 1 + lib/oxidized/model/cisconga.rb | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lib/oxidized/model/cisconga.rb diff --git a/README.md b/README.md index 0d35ab2..2317b5e 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen * [CatOS](lib/oxidized/model/catos.rb) * [IOS](lib/oxidized/model/ios.rb) * [IOSXR](lib/oxidized/model/iosxr.rb) + * [NGA](lib/oxidized/model/cisconga.rb) * [NXOS](lib/oxidized/model/nxos.rb) * [SMB (Nikola series)](lib/oxidized/model/ciscosmb.rb) * Citrix 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(-) 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 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(-) 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(-) 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 565069279026eb99f10c674c3c9ddbc015b07cae Mon Sep 17 00:00:00 2001 From: Ben White Date: Wed, 22 Mar 2017 12:55:55 +0000 Subject: fix for auto-reload. 'read' doesn't block when stdin not attached to anything --- extra/auto-reload-config.runit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/auto-reload-config.runit b/extra/auto-reload-config.runit index 5eaecc8..cf6e7c2 100755 --- a/extra/auto-reload-config.runit +++ b/extra/auto-reload-config.runit @@ -2,7 +2,7 @@ if [ -z "$CONFIG_RELOAD_INTERVAL" ]; then # Just stop and do nothing - read + sleep infinity fi while true; do -- cgit v1.2.1 From d458417476c505c26783f7d1a1bcce9fa5b60309 Mon Sep 17 00:00:00 2001 From: Schylar Utley Date: Wed, 22 Mar 2017 08:54:53 -0500 Subject: Edit init script --- extra/oxidized.init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/oxidized.init b/extra/oxidized.init index 197c5b1..8a996c2 100755 --- a/extra/oxidized.init +++ b/extra/oxidized.init @@ -15,11 +15,11 @@ set -e PATH=/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/home/sts/oxidized/bin/oxidized +DAEMON=PATH_TO_OXIDIZED_BIN NAME="oxidized" DESC="Oxidized - Network Device Configuration Backup Tool" ARGS="" -USER="sts" +USER="USER_FOR_OXIDIZED_SERVICE" test -x $DAEMON || exit 0 -- cgit v1.2.1 From 50a589265fa240de2d7e918cb4cca488684d2ee1 Mon Sep 17 00:00:00 2001 From: Schylar Utley Date: Wed, 22 Mar 2017 10:04:52 -0500 Subject: Update oxidized.init --- extra/oxidized.init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/oxidized.init b/extra/oxidized.init index 8a996c2..64758fb 100755 --- a/extra/oxidized.init +++ b/extra/oxidized.init @@ -15,11 +15,11 @@ set -e PATH=/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=PATH_TO_OXIDIZED_BIN +DAEMON=/usr/local/bin/oxidized NAME="oxidized" DESC="Oxidized - Network Device Configuration Backup Tool" ARGS="" -USER="USER_FOR_OXIDIZED_SERVICE" +USER="oxidized" test -x $DAEMON || exit 0 -- cgit v1.2.1 From 155d13a045a59f708ea0195e7ae91cbbbd75f7e8 Mon Sep 17 00:00:00 2001 From: Schylar Utley Date: Wed, 22 Mar 2017 11:01:23 -0500 Subject: Update oxidized.init --- extra/oxidized.init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/oxidized.init b/extra/oxidized.init index 64758fb..7a9698d 100755 --- a/extra/oxidized.init +++ b/extra/oxidized.init @@ -14,8 +14,8 @@ set -e -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/local/bin/oxidized +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin +DAEMON=$(which oxidized) NAME="oxidized" DESC="Oxidized - Network Device Configuration Backup Tool" ARGS="" -- cgit v1.2.1 From 7330a4955e5bac649b3a4d9da3007ff90f267cdf Mon Sep 17 00:00:00 2001 From: Schylar Utley Date: Wed, 22 Mar 2017 11:37:52 -0500 Subject: Add Service Instructions --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 2317b5e..e599796 100644 --- a/README.md +++ b/README.md @@ -898,6 +898,35 @@ hooks: channel: "#network-changes" ``` +# Extra + +## Ubuntu init setup + +The init script assumes that you have a used named 'oxidized' and that oxidized is in one of the following paths: + +``` +/sbin +/bin +/usr/sbin +/usr/bin +/usr/local/bin +``` + +Copy init script from extra/ folder to /etc/init.d/oxidized + +Setup /var/run/ + +``` +mkdir /var/run/oxidized +chown oxidized:oxidized /var/run/oxidized +``` + +To make oxidized start on boot + +``` +update-rc.d oxidized deafults +``` + Note the channel name must be in quotes. # Ruby API -- 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(-) 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 From 4aeb996ef62bbc29ef707e7c5792894af86b6504 Mon Sep 17 00:00:00 2001 From: Schylar Utley Date: Wed, 22 Mar 2017 11:43:50 -0500 Subject: Clarify init setup --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e599796..5dcd7e0 100644 --- a/README.md +++ b/README.md @@ -900,7 +900,7 @@ hooks: # Extra -## Ubuntu init setup +## Ubuntu SystemV init setup The init script assumes that you have a used named 'oxidized' and that oxidized is in one of the following paths: @@ -912,16 +912,15 @@ The init script assumes that you have a used named 'oxidized' and that oxidized /usr/local/bin ``` -Copy init script from extra/ folder to /etc/init.d/oxidized - -Setup /var/run/ +1.)Copy init script from extra/ folder to /etc/init.d/oxidized +2.)Setup /var/run/ ``` mkdir /var/run/oxidized chown oxidized:oxidized /var/run/oxidized ``` -To make oxidized start on boot +3.)Make oxidized start on boot ``` update-rc.d oxidized deafults -- cgit v1.2.1