From f1287a7925901bf3518eb69079304bfb97f7434d Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sat, 20 Apr 2013 00:41:23 +0300 Subject: Example of Syslog triggered fetch 'syslog.rb' listed to UDP port (or reads file). When IOS or JunOS style config change/commit message is seen, it triggers immediate update ot config It transports commit message (junos) remote host from which change was mde (ios) and who made the change (junos+ios). This is carried over to the 'output' methods, that is, 'git blame' will show IOS/JunOS user-name who made the change. --- lib/oxidized/nodes.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/oxidized/nodes.rb') diff --git a/lib/oxidized/nodes.rb b/lib/oxidized/nodes.rb index 3e58348..e5e87e5 100644 --- a/lib/oxidized/nodes.rb +++ b/lib/oxidized/nodes.rb @@ -31,9 +31,15 @@ module Oxidized delete_at i if i end # @param node [String] name of the node moved into the head of array - def next node + def next node, opt={} + require 'pp' n = del node - put n if n + if n + n.user = opt['user'] + n.msg = opt['msg'] + n.from = opt['from'] + put n + end end alias :top :next # @return [String] node from the head of the array -- cgit v1.2.1