forked from ytti/oxidized
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:ytti/oxidized
- Loading branch information
Showing
10 changed files
with
148 additions
and
466 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Publish Docker | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: oxidized/oxidized | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
# model for Centec Networks CNOS based switches | ||
class CNOS < Oxidized::Model | ||
comment '! ' | ||
|
||
cmd :all do |cfg| | ||
cfg.each_line.to_a[0..-2].join | ||
end | ||
|
||
cmd 'show running-config' do |cfg| | ||
cfg.gsub!(/(snmp-server community )(\S+)/, '\1<hidden>') | ||
cfg.gsub!(/key type private.+key string end/m, '<private key hidden>') | ||
cfg | ||
end | ||
|
||
cmd 'show version' do |cfg| | ||
cfg.gsub! /^(.* uptime is ).*\n/, '\1' | ||
comment cfg | ||
end | ||
|
||
cmd 'show transceiver' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cfg :telnet do | ||
username /^Username:/ | ||
password /^Password:/ | ||
end | ||
|
||
cfg :telnet, :ssh do | ||
post_login 'terminal length 0' | ||
pre_logout 'exit' | ||
end | ||
end |
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
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,46 @@ | ||
class OS10 < Oxidized::Model | ||
# For switches running Dell EMC Networking OS10 # | ||
# | ||
# Tested with : Dell PowerSwitch S4148U-ON | ||
|
||
comment '! ' | ||
|
||
cmd :all do |cfg| | ||
cfg.gsub! /^% Invalid input detected at '\^' marker\.$|^\s+\^$/, '' | ||
cfg.each_line.to_a[2..-2].join | ||
end | ||
|
||
cmd :secret do |cfg| | ||
cfg.gsub! /(password )(\S+)/, '\1<secret hidden>' | ||
cfg | ||
end | ||
|
||
cmd 'show inventory' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cmd 'show inventory media' do |cfg| | ||
comment cfg | ||
end | ||
|
||
cmd 'show running-configuration' do |cfg| | ||
cfg.each_line.to_a[3..-1].join | ||
end | ||
|
||
cfg :telnet do | ||
username /^Login:/ | ||
password /^Password:/ | ||
end | ||
|
||
cfg :telnet, :ssh do | ||
if vars :enable | ||
post_login do | ||
send "enable\n" | ||
cmd vars(:enable) | ||
end | ||
end | ||
post_login 'terminal length 0' | ||
pre_logout 'exit' | ||
pre_logout 'exit' | ||
end | ||
end |
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,24 @@ | ||
class TELCO < Oxidized::Model | ||
# Telco Systems T-Marc 3306 | ||
|
||
prompt /^(\r?[\w.@_()-]+[#]\s?)$/ | ||
comment '! ' | ||
|
||
cmd :all do |cfg| | ||
cfg.each_line.to_a[2..-2].join.delete("\n") | ||
end | ||
|
||
cmd 'show running-config' do |cfg| | ||
cfg | ||
end | ||
|
||
cfg :ssh, :telnet do | ||
post_login 'terminal length 0' | ||
pre_logout 'exit' | ||
end | ||
|
||
cfg :telnet do | ||
username /^Username:/ | ||
password /^Password:/ | ||
end | ||
end |