diff options
author | ghankins <ghankins@mindspring.com> | 2016-08-03 23:07:02 -0400 |
---|---|---|
committer | ghankins <ghankins@mindspring.com> | 2016-08-03 23:07:02 -0400 |
commit | fcdb5df4cb9223c340efd891fab7ac7cdcd1ba7a (patch) | |
tree | 6c6406f99127fa781c5ab8f1896c6795fc313e43 /lib | |
parent | d54c81601160585cad539ff20695f834c7adbb59 (diff) |
Updated SR OS commands.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/model/timos.rb | 79 |
1 files changed, 65 insertions, 14 deletions
diff --git a/lib/oxidized/model/timos.rb b/lib/oxidized/model/timos.rb index 6bbdddf..eee63e0 100644 --- a/lib/oxidized/model/timos.rb +++ b/lib/oxidized/model/timos.rb @@ -1,8 +1,14 @@ class TiMOS < Oxidized::Model - # Nokia SR OS (TiMOS) (formerly TiMetra, Alcatel, Alcatel-Lucent) - # used in 7705 SAR, 7210 SAS, 7450 ESS, 7750 SR, 7950 XRS, and NSP - + # + # Nokia SR OS (TiMOS) (formerly TiMetra, Alcatel, Alcatel-Lucent). + # Used in 7705 SAR, 7210 SAS, 7450 ESS, 7750 SR, 7950 XRS, and NSP. + # + + # + # Define comment but don't actually use it. SR OS has a lot of output that + # is exactly 80 columns wide, and the comment make the output look funny. + # comment '# ' prompt /^([-\w\.:>\*]+\s?[#>]\s?)$/ @@ -12,26 +18,71 @@ class TiMOS < Oxidized::Model new_cfg << cfg.each_line.to_a[1..-2].join end - cmd 'show bof' do |cfg| - comment cfg - end + # + # Show the boot options file. + # + cmd 'show bof' + # + # Show the system information. + # cmd 'show system information' do |cfg| - # strip uptime + # + # Strip uptime. + # cfg.sub! /^System Up Time.*\n/, '' - comment cfg end - cmd 'show card state' do |cfg| - comment cfg + # + # Show the card state. + # + cmd 'show card state' + + # + # Show the boot log. + # + cmd 'file type bootlog.txt' do |cfg| + # + # Strip carriage returns and backspaces. + # + cfg.gsub! /\r/, '' + cfg.gsub! /[\b][\b][\b]/, "\n" end - cmd 'show boot-messages' do |cfg| - cfg.gsub! /\r/, "" - comment cfg + # + # Show the running debug configuration. + # + cmd 'show debug' + + # + # Show the saved debug configuration (admin debug-save). + # + cmd 'file type config.dbg' do |cfg| + # + # Strip carriage returns. + # + cfg.gsub! /\r/, '' end - cmd 'admin display-config' + # + # Show the running persistent indices. + # + cmd 'admin display-config index' do |cfg| + # + # Strip carriage returns. + # + cfg.gsub! /\r/, '' + end + + # + # Show the running configuration. + # + cmd 'admin display-config' do |cfg| + # + # Strip carriage returns. + # + cfg.gsub! /\r/, '' + end cfg :telnet do username /^Login: / |