diff options
author | Saku Ytti <saku@ytti.fi> | 2013-04-20 00:41:23 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2013-04-20 00:41:23 +0300 |
commit | f1287a7925901bf3518eb69079304bfb97f7434d (patch) | |
tree | 3dd2779e4d087b73b99d7136f37db88c76091d8d /lib/oxidized/nodes.rb | |
parent | 5a393d6102655f575549311e6b250534b4dcbb59 (diff) |
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.
Diffstat (limited to 'lib/oxidized/nodes.rb')
-rw-r--r-- | lib/oxidized/nodes.rb | 10 |
1 files changed, 8 insertions, 2 deletions
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 |