summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorghankins <ghankins@mindspring.com>2016-08-04 09:47:17 -0400
committerghankins <ghankins@mindspring.com>2016-08-04 09:47:17 -0400
commiteb56404370bc8da6c999b3684d6c7654d09a60ab (patch)
tree38fd58833d370cbf93e82d3e33466ef1a4bf431f /lib
parentfcdb5df4cb9223c340efd891fab7ac7cdcd1ba7a (diff)
Added comments.
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/model/timos.rb20
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/oxidized/model/timos.rb b/lib/oxidized/model/timos.rb
index eee63e0..d40e845 100644
--- a/lib/oxidized/model/timos.rb
+++ b/lib/oxidized/model/timos.rb
@@ -5,10 +5,6 @@ class TiMOS < Oxidized::Model
# 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?)$/
@@ -21,7 +17,9 @@ class TiMOS < Oxidized::Model
#
# Show the boot options file.
#
- cmd 'show bof'
+ cmd 'show bof' do |cfg|
+ comment cfg
+ end
#
# Show the system information.
@@ -31,12 +29,15 @@ class TiMOS < Oxidized::Model
# Strip uptime.
#
cfg.sub! /^System Up Time.*\n/, ''
+ comment cfg
end
#
# Show the card state.
#
- cmd 'show card state'
+ cmd 'show card state' do |cfg|
+ comment cfg
+ end
#
# Show the boot log.
@@ -47,12 +48,15 @@ class TiMOS < Oxidized::Model
#
cfg.gsub! /\r/, ''
cfg.gsub! /[\b][\b][\b]/, "\n"
+ comment cfg
end
#
# Show the running debug configuration.
#
- cmd 'show debug'
+ cmd 'show debug' do |cfg|
+ comment cfg
+ end
#
# Show the saved debug configuration (admin debug-save).
@@ -62,6 +66,7 @@ class TiMOS < Oxidized::Model
# Strip carriage returns.
#
cfg.gsub! /\r/, ''
+ comment cfg
end
#
@@ -72,6 +77,7 @@ class TiMOS < Oxidized::Model
# Strip carriage returns.
#
cfg.gsub! /\r/, ''
+ comment cfg
end
#