diff options
| author | ospfbgp <danielcoxman@gmail.com> | 2017-05-15 00:44:31 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-15 00:44:31 -0400 | 
| commit | 97133ec863c695c6eaea6a4da523128234344295 (patch) | |
| tree | dd09d8a9edc9b006f74ac8521a8d2e9851a5e442 /lib/oxidized/model/voss.rb | |
| parent | 19ac4fd67bc2fb3a980e0b62a6e26ee1c42ff700 (diff) | |
Update voss.rb because of git diff
every config update was making a diff because temperature was included in "show sys-info".  Used more specific commands so temperature is not included now.
Diffstat (limited to 'lib/oxidized/model/voss.rb')
| -rw-r--r-- | lib/oxidized/model/voss.rb | 23 | 
1 files changed, 15 insertions, 8 deletions
| diff --git a/lib/oxidized/model/voss.rb b/lib/oxidized/model/voss.rb index 075f001..8a82fb3 100644 --- a/lib/oxidized/model/voss.rb +++ b/lib/oxidized/model/voss.rb @@ -1,22 +1,25 @@  class Voss < Oxidized::Model    # Avaya VSP Operating System Software(VOSS)    # Created by danielcoxman@gmail.com -  # May 9, 2017 +  # May 15, 2017    # This was tested on vsp4k and vsp8k    comment '# '    prompt /^[^\s#>]+[#>]$/ -  cmd 'show sys-info' do |cfg| -    comment cfg -  end +  # 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" }    # more the config rather than doing a show run    cmd 'more config.cfg' do |cfg|      cfg      cfg.gsub! /^[^\s#>]+[#>]$/, '' -    cfg.gsub! /^more config.cfg/, '' +    cfg.gsub! /^more config.cfg/, '# more config.cfg'    end    cfg :telnet do @@ -24,10 +27,14 @@ class Voss < Oxidized::Model      password /Password: $/    end -  cfg :telnet, :ssh do +cfg :telnet, :ssh do      pre_logout 'exit' -    post_login 'enable' -    post_login 'terminal more disable' +    post_login do +      send "enable\n" +      send "terminal more disable\n" +      # Backup the config via tftp to a tftpserver of your choice +      #send "copy config.cfg x.x.x.x:" + node.name + ".cfg\n" +    end    end  end | 
