Skip to content

Commit

Permalink
Enterasys improvements (#2412)
Browse files Browse the repository at this point in the history
* enterasys: Improve Telnet support

* enterasys: Include "show version" output as comment
  • Loading branch information
jplitza authored Dec 1, 2021
1 parent 3e06db1 commit 99542dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- enterasys model now works with both ro and rw access (@sargon)
- restore including last configuration change IOS if the change is done by real user. Resolves #1921 (@raunz)
- Additional scrubbing for SonicOS v7 devices (@gerard780)

- improved Telnet support for enterasys (@jplitza)
- Include "show version" output for enterasys (@jplitza)

### Fixed

Expand Down
11 changes: 10 additions & 1 deletion lib/oxidized/model/enterasys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class Enterasys < Oxidized::Model
comment cfg
end

cmd 'show version' do |cfg|
comment cfg
end

cmd 'show config' do |cfg|
cfg.gsub! /^This command shows non-default configurations only./, ''
cfg.gsub! /^Use 'show config all' to show both default and non-default configurations./, ''
Expand All @@ -22,7 +26,12 @@ class Enterasys < Oxidized::Model
cfg
end

cfg :ssh do
cfg :telnet do
username /^Username:/i
password /^Password:/i
end

cfg :telnet, :ssh do
pre_logout 'exit'
end
end

0 comments on commit 99542dc

Please sign in to comment.