You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cfg :ssh do
post_login 'terminal page-break disable'
pre_logout 'exit'
end
end
There is a difference between the terminal page-break disable command of raisecom equipment and the terminal length0 of cisco. The command effect still exists after the session ends. The command will be automatically output after the next login to the device, which is very unfriendly.
This is the version I optimized and I think is pretty good:
class RAISECOM < Oxidized::Model
using Refinements
The original script is this:
cfg :ssh do
post_login 'terminal page-break disable'
pre_logout 'exit'
end
end
There is a difference between the terminal page-break disable command of raisecom equipment and the terminal length0 of cisco. The command effect still exists after the session ends. The command will be automatically output after the next login to the device, which is very unfriendly.
This is the version I optimized and I think is pretty good:
class RAISECOM < Oxidized::Model
using Refinements
comment '!' ##在每行添加 !注释,如果想去除可以' '
prompt /([>-#]\s?)$/
cmd 'show version' do |cfg|
comment cfg
end
cmd 'show running-config' do |cfg|
comment cfg
end
cmd 'terminal page-break enable' do |cfg|
comment cfg
cfg
end
cfg :telnet do
username /Login:/
password /Password:/
post_login 'terminal page-break disable'
pre_logout 'exit'
end
end
note:
!command in qos mapping mode
!
--More-- (The device will not automatically paging,It looks like the command has been executed successfully.)
The text was updated successfully, but these errors were encountered: