-
Notifications
You must be signed in to change notification settings - Fork 932
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3069 from tcrichton/tcrichto/fsos
Add support for Fibrestore FSOS
- Loading branch information
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |