oxidized
oxidized copied to clipboard
Two new models, Nokia SROS ISAM 7360 and Huawei VRP
Added two new models for Nokia/Huawei devices
vrp58.rb is a file for the Huawei MA58xx platform sros_isam is model file for the Nokia ISAM platforn (7360)
@rinsekloek
This is awesome!
I had a very barebone model for our Nokia ISAM: https://github.com/ytti/oxidized/issues/2290#issuecomment-830345876
Thank you for posting this!!
@rinsekloek Two things we noticed with this model:
- When using these cmds, it only runs the first post_login and nothing after that
post_login 'environment no terminal-timeout'
post_login 'environment print no-more'
post_login 'environment inhibit-alarms'
Our workaround:
cfg :telnet, :ssh do
#post_login 'environment no terminal-timeout'
#post_login 'environment print no-more'
#post_login 'environment inhibit-alarms'
post_login 'echo 123\n123\n123\n123\n'
pre_logout 'logout'
end
Because this creates alarms on the terminal we added this cfg.gsub
cfg.gsub! /^\d+\/\d+\/\d+\s\d+:\d+:\d+\smajor\salarm\s(cleared|occurred)\sfor\s.*$/, ''
- There is a lot of bargabe:
+-[1D\[1D|[1D/[1D-[1D\[1D|[1D/[1D-[1D\[1D|[1D/[1D-[1D\[1D|[1D/[1D-[1D [1D exit
Our workaround, added the below:
# replace all used vt100 control sequences
expect /\e\[\??\d+(;\d+)*[A-Za-z]/ do |data, re|
data.gsub re, ''
end
# replace remaining junk; literally "-\|/"
expect /^(-\\\|\/)+/ do |data, re|
data.gsub re, ''
end
# replace hopefully last junk; literatlly "-\" or "-"
expect /^(\-\\ |- )/ do |data, re|
data.gsub re, ''
end
cmd :all do |cfg, cmdstring|
new_cfg = comment "COMMAND: #{cmdstring}\n"
Any input is appreciated! Thank you, Dave
Please update the documentation and CHANGELOG