Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LANCOM support #2139

Merged
merged 11 commits into from
Jul 6, 2020
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- add ES3526XA-V2 support in EdgeCOS model (@moisseev)
- model for eltex mes-series switches (@glaubway)
- model for zte c300 and c320 olt (@glaubway)
- model for LANCOM (@systeembeheerder)

### Changed

Expand Down
2 changes: 2 additions & 0 deletions docs/Supported-OS-Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@
* Juniper
* [JunOS](/lib/oxidized/model/junos.rb)
* [ScreenOS (Netscreen)](/lib/oxidized/model/screenos.rb)
* LANCOM Systems GmbH
* [LCOS](/lib/oxidized/model/lancom.rb)
* Linuxgeneric
* [CentOS](/lib/oxidized/model/linuxgeneric.rb)
* Mellanox
Expand Down
23 changes: 23 additions & 0 deletions lib/oxidized/model/lancom.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class LANCOM < Oxidized::Model
# LANCOM Systems GmbH
# tested on LANCOM 1781EF+ router using Lancom OS 10.32.0176RU9 / 21.04.2020
comment '# '

prompt />\s?$/

cmd "sysinfo\r" do |cfg|
cfg.gsub! /^TIME:.*\n/, ''
comment cfg
end

cmd "readscript\r"

cfg :telnet do
username /login:\s/
password /^Password:\s/
end

cfg :telnet, :ssh do
pre_logout "exit\r"
end
end