summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorospfbgp <danielcoxman@gmail.com>2017-05-15 02:12:18 -0400
committerGitHub <noreply@github.com>2017-05-15 02:12:18 -0400
commitdd8101df0aa579405eab958da623fb36ef3231ab (patch)
tree62c756c5851796a5f08ad7b9698d9ddabff2f6af
parent76b9a6ea902ce699f90305ec7a58882da798acbe (diff)
Update boss.rb
had some test code that needed to be removed
-rw-r--r--lib/oxidized/model/boss.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/oxidized/model/boss.rb b/lib/oxidized/model/boss.rb
index 93f9903..02201a1 100644
--- a/lib/oxidized/model/boss.rb
+++ b/lib/oxidized/model/boss.rb
@@ -39,6 +39,7 @@ class Boss < Oxidized::Model
cfg.gsub! /(^((.*)sysUpTime(.*))$)/, 'removed sysUpTime'
cfg.gsub! /(^((.*)sysNtpTime(.*))$)/, 'removed sysNtpTime'
cfg.gsub! /(^((.*)sysRtcTime(.*))$)/, 'removed sysNtpTime'
+ # remove timestamp
cfg.gsub! /\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} .*/, ''
comment "#{cfg}\n"
end
@@ -46,6 +47,7 @@ class Boss < Oxidized::Model
# if a stack then collect the stacking information
cmd 'show stack-info' do |cfg|
if @stack
+ # remove timestamp
cfg.gsub! /\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} .*/, ''
comment "#{cfg}\n"
end
@@ -53,7 +55,7 @@ class Boss < Oxidized::Model
cmd 'show running-config' do |cfg|
cfg.gsub! /^show running-config/, '! show running-config'
- # remove cli timestamp
+ # remove timestamp
cfg.gsub! /\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} .*/, ''
cfg.gsub! /^[^\s#>]+[#>]$/, ''
cfg.gsub! /^! clock set.*/, '! removed clock set'
@@ -66,15 +68,9 @@ class Boss < Oxidized::Model
end
cfg :telnet, :ssh do
- pre_logout do
- # Backup the running-config via tftp to a tftpserver of your choice
- #send "copy running-config tftp address x.x.x.x filename " + node.name + ".cli\n"
- send "logout\n"
- end
- post_login do
- send "terminal length 0\n"
- send "terminal width 132\n"
- end
+ pre_logout 'logout'
+ post_login 'terminal length 0'
+ post_login 'terminal width 132'
end
end