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

Create fortiwlc.rb #2473

Merged
4 commits merged into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- model for zte c300 and c320 olt (@glaubway)
- model for LANCOM (@systeembeheerder)
- model for Aruba CX switches (@jmurphy5)
- model for FortiWLC WLAn Controller (@MrMarioMichel)
- model for NEC IX devices (@mikenowak)
- Added docs for Dell/EMC Networking OS10 devices (@davromaniak)
- model for Zyxel 1308 OLTs (@baldoarturo)
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 @@ -136,6 +136,8 @@
* [FTOS](/lib/oxidized/model/ftos.rb)
* FortiGate
* [FortiOS](/lib/oxidized/model/fortios.rb)
* FortiWLC
* [FortiWLC](/lib/oxidized/model/fortiwlc.rb)
* Fujitsu
* [PRIMERGY Blade switch 1/10Gbe](/lib/oxidized/model/fujitsupy.rb)
* GCOM Technologies
Expand Down
24 changes: 24 additions & 0 deletions lib/oxidized/model/fortiwlc.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class FortiWLC < Oxidized::Model
comment '# '

cmd :all do |cfg, cmdstring|
new_cfg = comment "COMMAND: #{cmdstring}\n"
new_cfg << cfg.each_line.to_a[1..-2].map { |line| line.gsub(/(conf_file_ver=)(.*)/, '\1<stripped>\3') }.join
end

prompt /^([-\w.\/:?\[\]()]+[#>]\s?)$/

cmd 'show controller' do |cfg|
comment cfg
end
cmd 'show ap' do |cfg|
comment cfg
end
cmd 'show running-config' do |cfg|
comment cfg
end

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