diff options
author | Neil Lathwood <neil@lathwood.co.uk> | 2018-04-27 10:51:39 +0100 |
---|---|---|
committer | Neil Lathwood <neil@lathwood.co.uk> | 2018-04-27 10:51:39 +0100 |
commit | 6574f129bca9633d728c178b12e49a2e9be89cdd (patch) | |
tree | a2d630fca3156658aea07469b9a5c3fdf00f6846 /lib/oxidized/model/supermicro.rb | |
parent | d96cfac1f09ff4055f54ab604358290865d41f62 (diff) | |
parent | 34fd5369feee94ab45c5a81d7769b1df717e4c8c (diff) |
Rebased from master
Diffstat (limited to 'lib/oxidized/model/supermicro.rb')
-rw-r--r-- | lib/oxidized/model/supermicro.rb | 47 |
1 files changed, 6 insertions, 41 deletions
diff --git a/lib/oxidized/model/supermicro.rb b/lib/oxidized/model/supermicro.rb index 361244c..56d5ef6 100644 --- a/lib/oxidized/model/supermicro.rb +++ b/lib/oxidized/model/supermicro.rb @@ -1,45 +1,10 @@ -class Supermicro < Oxidized::Model - comment '! ' +# Backward compatibility shim for deprecated model `supermicro`. +# Migrate your source from `supermicro` to `edgecos`. - cmd :secret do |cfg| - cfg.gsub!(/password \d+ (\S+).*/, '<secret removed>') - cfg.gsub!(/community (\S+)/, 'community <hidden>') - cfg - end +require_relative 'edgecos.rb' - cmd :all do |cfg| - cfg.each_line.to_a[2..-2].join - end +Supermicro = EdgeCOS - cmd 'show running-config' +Oxidized.logger.warn "Using deprecated model supermicro, use edgecos instead." - cmd 'show access-list tcam-utilization' do |cfg| - comment cfg - end - - cmd 'show memory' do |cfg| - comment cfg - end - - cmd 'show system' do |cfg| - comment cfg - end - - cmd 'show version' do |cfg| - comment cfg - end - - cmd 'show watchdog' do |cfg| - comment cfg - end - - cfg :telnet do - username /^Username:/ - password /^Password:/ - end - - cfg :telnet, :ssh do - post_login 'terminal length 0' - pre_logout 'exit' - end -end
\ No newline at end of file +# Deprecated |