-
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.
- Loading branch information
1 parent
366ac34
commit 4da2e3f
Showing
3 changed files
with
44 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,42 @@ | ||
class OcNOS < Oxidized::Model | ||
using Refinements | ||
|
||
prompt /([\w.@-]+[#>]\s?)$/ | ||
comment '# ' | ||
|
||
cfg :ssh do | ||
post_login 'terminal length 0' | ||
pre_logout do | ||
send "disable\r" | ||
send "logout\r" | ||
end | ||
end | ||
|
||
cmd :all do |cfg| | ||
cfg.lines.to_a[1..-2].join | ||
end | ||
|
||
cmd 'show version' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cmd 'show system fru' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cmd 'show system-information board-info' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cmd 'show forwarding profile limit' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cmd 'show license' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cmd 'show running-config' do |cfg| | ||
cfg | ||
end | ||
end |