Skip to content

Commit

Permalink
Merge branch 'master' into gitcrypt-refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocret authored Aug 10, 2023
2 parents 7421ac4 + 1d83971 commit c75f074
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## Added
- model for D-Link cisco like CLI (@mirackle-spb)
- model for Ruijie Networks RGOS devices (@spike77453)
- model for Asterfusion Network Operating System (@avl-dev)
- pagination for http source (@davama)
- model for Ericsson Miniling 6600 series (@schouwenburg)

+ Added ability to send mail with the Docker container
+ Documentation to send mail with hooks
Expand All @@ -18,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- tp-link: fixed enable mode post login entrance (@mirackle-spb)
- dlink: fixed prompt for other dlink switches, added additional uptime removal expressions (@mirackle-spb)
- Collect VC info for juniper ex3400 (@ermuller)
- adva: fix config content for recovery process, collect config delta instead of current (@MichiMeyer)

## Fixed

Expand All @@ -29,7 +32,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- Do not redirect stderr when fetching opnsense version since default shell (csh) doesn't support it (@spike77453)
- Fixed fan RPM speeds included in Aruba CX diffs (@danpoltawski)
- Gitcrypt output refinements (@electrocret)

- Remove constantly updating dates from backup of Adtran config (@davesbell)
- fixed prompt for Cumulus to allow usernames with dots and dashes (@ktims)

## [0.29.1 - 2023-04-24]

Expand Down
3 changes: 3 additions & 0 deletions docs/Supported-OS-Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
* Aruba
* [AOS-CX](/lib/oxidized/model/aoscx.rb)
* [AOSW](/lib/oxidized/model/aosw.rb)
* Asterfusion
* [AsterNOS](/lib/oxidized/model/asternos.rb)
* AudioCodes
* [AudioCodes](/lib/oxdized/model/audiocodes.rb)
* [MediaPack MP-1xx, Mediant1000](/lib/oxdized/model/audiocodesmp.rb)
Expand Down Expand Up @@ -117,6 +119,7 @@
* [Eltex](/lib/oxidized/model/eltex.rb)
* Ericsson/Redback
* [IPOS (former SEOS)](/lib/oxidized/model/ipos.rb)
* [Minilink 6600](/lib/oxidized/model/ml66.rb)
* Extreme Networks
* [Enterasys B/C-Series](/lib/oxidized/model/enterasys.rb)
* [Enterasys 800-Series](/lib/oxidized/model/enterasys800.rb)
Expand Down
6 changes: 5 additions & 1 deletion lib/oxidized/model/adtran.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ class Adtran < Oxidized::Model
cfg
end

cmd 'show running-config'
cmd 'show running-config' do |cfg|
# Strip out line at the top which displays the current date/time
# ! Created : Mon Jun 26 2023 10:07:07
cfg.gsub! /! Createds+:.*\n/, ''
end

cfg :ssh do
if vars :enable
Expand Down
2 changes: 1 addition & 1 deletion lib/oxidized/model/adva.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ADVA < Oxidized::Model
cfg.cut_both
end

cmd 'show running-config current' do |cfg|
cmd 'show running-config delta' do |cfg|
cfg.each_line.reject { |line| line.match /^Preparing configuration file.*/ }.join
end

Expand Down
23 changes: 23 additions & 0 deletions lib/oxidized/model/asternos.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class AsterNOS < Oxidized::Model
using Refinements

prompt /^[^\$]+\$/
comment '# '

cmd :all do |cfg|
cfg = cfg.each_line.to_a[1..-2].join
end

cmd 'show version' do |cfg|
# @model = Regexp.last_match(1) if cfg =~ /^Model: (\S+)/
comment cfg
end

cmd "show runningconfiguration all"


cfg :ssh do
# exec true
pre_logout 'exit'
end
end
2 changes: 1 addition & 1 deletion lib/oxidized/model/cumulus.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Cumulus < Oxidized::Model
using Refinements

prompt /^((\w*)@(.*)):/
prompt /^(([\w.-]*)@(.*)):/
comment '# '

# add a comment in the final conf
Expand Down
34 changes: 34 additions & 0 deletions lib/oxidized/model/ml66.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class ML66 < Oxidized::Model
comment '! '
prompt /.*#/

expect /User:.*$/ do |data, re|
send "admin_user\n"
send "#{@node.auth[:password]}\n"
data.sub re, ''
end

cmd 'show version' do |cfg|
cfg.gsub! /Uptime/, ''
comment cfg
end

cmd 'show inventory hw all' do |cfg|
comment cfg
end

cmd 'show inventory sw all' do |cfg|
comment cfg
end

cmd 'show license status all' do |cfg|
comment cfg
end

cmd 'show running-config'

cfg :ssh do
pre_logout 'logout'
end

end

0 comments on commit c75f074

Please sign in to comment.