Skip to content

Commit

Permalink
Merge pull request #3069 from tcrichton/tcrichto/fsos
Browse files Browse the repository at this point in the history
Add support for Fibrestore FSOS
  • Loading branch information
robertcheramy authored Feb 16, 2024
2 parents 2a6d2ff + c666131 commit ff79420
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- added SCP input (@aeiodelic)
- Added `linux/arm64` and `linux/amd64` platforms to Docker build/publish. (@disaac)
- Added verion info for Vyatta (@systeembeheerder)
- model for Fibrestore (fs.com) FSOS (@tcrichton)
- model for IP Infusion OcNOS

## Changed
Expand Down
11 changes: 11 additions & 0 deletions docs/Model-Notes/FSOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Fiberstore (fs.com) FSOS notes

This has been tested against the following models and OS versions

|Model |OS Version and Build |
|--------------------|------------------------------|
|S3400-48T4SP |Version 2.0.2J Build 81736 |
|S3400-48T4SP |Version 2.0.2J Build 95262 |
|S3400-48T6SP |Version 2.2.0F Build 109661 |

Back to [Model-Notes](README.md)
1 change: 1 addition & 0 deletions docs/Supported-OS-Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
| |CatOS |[catos](/lib/oxidized/model/catos.rb)
| |Cisco Catalyst Express |[ciscoce](/lib/oxidized/model/ciscoce.rb)
| |FireLinuxOS |[firelinuxos](/lib/oxidized/model/firelinuxos.rb)
|Fiberstore (fs.com) |FSOS |[fsos](/lib/oxidized/model/fsos.rb) | |[FSOS](Model-Notes/FSOS.md)
| |IOS |[ios](/lib/oxidized/model/ios.rb) |@robertcheramy |[IOS](Model-Notes/IOS.md)
| |IOSXR |[iosxr](/lib/oxidized/model/iosxr.rb)
| |NGA |[cisconga](/lib/oxidized/model/cisconga.rb)
Expand Down
43 changes: 43 additions & 0 deletions lib/oxidized/model/fsos.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
class FSOS < Oxidized::Model
# Fiberstore / fs.com
using Refinements
comment '! '

# Handle paging
expect /^ --More--.*$/ do |data, re|
send ' '
data.sub re, ''
end

cmd :secret do |cfg|
cfg.gsub! /(secret \w+) (\S+).*/, '\\1 <secret hidden>'
cfg.gsub! /(password \d+) (\S+).*/, '\\1 <secret hidden>'
cfg.gsub! /(snmp-server community \d+) (\S+).*/, '\\1 <secret hidden>'
cfg
end

cmd 'show version' do |cfg|
# Remove uptime so the result doesn't change every time
cfg.gsub! /.*uptime is.*\n/, ''
comment cfg
end

cmd 'show running-config' do |cfg|
# Remove "Building configuration..." message
cfg.gsub! /^Building configuration.*\n/, ''
cfg.cut_head
end

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

cfg :telnet, :ssh do
post_login 'enable'
post_login 'terminal length 0'
post_login 'terminal width 256'
pre_logout 'exit'
pre_logout 'exit'
end
end

0 comments on commit ff79420

Please sign in to comment.