diff options
author | ospfbgp <danielcoxman@gmail.com> | 2017-05-25 06:39:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-25 06:39:01 -0500 |
commit | 73b62c432191ff2d7c513d34fbfdc3a20ff079fd (patch) | |
tree | 6ba5cc102426ec510a30ab4e23ccfee7ee5548b9 /lib/oxidized/model/voss.rb | |
parent | dc425ce5bc3143cf4b8322602d7b7521aca37134 (diff) |
Update voss.rb
changed back to show sys-info and remove the values that seem to change every time you do a show sys-info so a diff will not change after each backup.
Diffstat (limited to 'lib/oxidized/model/voss.rb')
-rw-r--r-- | lib/oxidized/model/voss.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/oxidized/model/voss.rb b/lib/oxidized/model/voss.rb index 599462a..6b15fb3 100644 --- a/lib/oxidized/model/voss.rb +++ b/lib/oxidized/model/voss.rb @@ -1,7 +1,7 @@ class Voss < Oxidized::Model # Avaya VSP Operating System Software(VOSS) # Created by danielcoxman@gmail.com - # May 15, 2017 + # May 25, 2017 # This was tested on vsp4k and vsp8k comment '# ' @@ -10,10 +10,16 @@ class Voss < Oxidized::Model # needed for proper formatting after post_login cmd('') { |cfg| comment "#{cfg}\n" } - # get some general information about switch - cmd('show sys-info card') { |cfg| comment "#{cfg}\n" } - cmd('show sys-info fan') { |cfg| comment "#{cfg}\n" } - cmd('show sys-info power') { |cfg| comment "#{cfg}\n" } + + # Get sys-info and remove information that changes such has temperature and power + cmd 'show sys-info' do |cfg| + cfg.gsub! /(^((.*)SysUpTime(.*))$)/, 'removed SysUpTime' + cfg.gsub! /^((.*)Temperature Info \:(.*\r?\n){4})/, 'removed Temperature Info and 3 more lines' + cfg.gsub! /(^((.*)AmbientTemperature(.*)\:(.*))$)/, 'removed AmbientTemperature' + cfg.gsub! /(^((.*)Temperature(.*)\:(.*))$)/, 'removed Temperature' + cfg.gsub! /(^((.*)Total Power Usage(.*)\:(.*))$)/, 'removed Total Power Usage' + comment "#{cfg}\n" + end # more the config rather than doing a show run cmd 'more config.cfg' do |cfg| |