-
Notifications
You must be signed in to change notification settings - Fork 942
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yurenkov Mikhail
committed
Feb 5, 2025
1 parent
4aa5df8
commit 631b243
Showing
3 changed files
with
35 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
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,33 @@ | ||
class KornfeldOS < Oxidized::Model | ||
using Refinements | ||
|
||
# For switches running Kornfeld OS | ||
# | ||
# Tested with : Kornfeld D1156 and Kornfeld D2132 | ||
|
||
comment '# ' | ||
|
||
cmd :all do |cfg| | ||
cfg.gsub! /^% Invalid input detected at '\^' marker\.$|^\s+\^$/, '' | ||
cfg.each_line.to_a[2..-2].join | ||
end | ||
|
||
cmd 'show version | except REPOSITORY | except docker | except Uptime' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cmd 'show platform firmware' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cmd 'show running-configuration' do |cfg| | ||
cfg.each_line.to_a[0..-1].join | ||
end | ||
|
||
cfg :ssh do | ||
username /^Login:/ | ||
password /^Password:/ | ||
post_login 'terminal length 0' | ||
pre_logout 'exit' | ||
end | ||
end |