summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2016-08-04 16:58:18 +0300
committerGitHub <noreply@github.com>2016-08-04 16:58:18 +0300
commit3bcf2ebc61294f2421f69c501440e4040968949a (patch)
tree38fd58833d370cbf93e82d3e33466ef1a4bf431f
parent642aad19ba1d06ec4c8e9e51ebf46573d2d2110f (diff)
parenteb56404370bc8da6c999b3684d6c7654d09a60ab (diff)
Merge pull request #522 from ghankins/master
Updates for Nokia SR OS.
-rw-r--r--README.md5
-rw-r--r--lib/oxidized/model/timos.rb71
2 files changed, 67 insertions, 9 deletions
diff --git a/README.md b/README.md
index 6a088c6..c94919e 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,6 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen
* AOS
* AOS7
* ISAM
- * TiMOS
* Wireless
* Arista
* EOS
@@ -118,6 +117,8 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen
* MasterOS
* Netonix
* WISP Switch (As Netonix)
+ * Nokia (formerly TiMetra, Alcatel, Alcatel-Lucent)
+ * SR OS (TiMOS)
* Opengear
* Opengear
* Palo Alto
@@ -510,7 +511,7 @@ output:
### Output types
-If you prefer to have different outputs in different files and/or directories, you can easily do this by modifying the corresponding model. To change the behaviour for IOS, you would edit `lib/oxidized/model/ios.rb`.
+If you prefer to have different outputs in different files and/or directories, you can easily do this by modifying the corresponding model. To change the behaviour for IOS, you would edit `lib/oxidized/model/ios.rb` (run `gem contents oxidized` to find out the full file path).
For example, let's say you want to split out `show version` and `show inventory` into separate files in a directory called `nodiff` which your tools will not send automated diffstats for. You can apply a patch along the lines of
diff --git a/lib/oxidized/model/timos.rb b/lib/oxidized/model/timos.rb
index dc28580..d40e845 100644
--- a/lib/oxidized/model/timos.rb
+++ b/lib/oxidized/model/timos.rb
@@ -1,8 +1,10 @@
class TiMOS < Oxidized::Model
- # Alcatel-Lucent TiMOS (Timetra)
- # used in SR/ESS/SAS routers
-
+ #
+ # Nokia SR OS (TiMOS) (formerly TiMetra, Alcatel, Alcatel-Lucent).
+ # Used in 7705 SAR, 7210 SAS, 7450 ESS, 7750 SR, 7950 XRS, and NSP.
+ #
+
comment '# '
prompt /^([-\w\.:>\*]+\s?[#>]\s?)$/
@@ -12,26 +14,81 @@ class TiMOS < Oxidized::Model
new_cfg << cfg.each_line.to_a[1..-2].join
end
+ #
+ # Show the boot options file.
+ #
cmd 'show bof' do |cfg|
comment cfg
end
+ #
+ # Show the system information.
+ #
cmd 'show system information' do |cfg|
- # strip uptime
+ #
+ # Strip uptime.
+ #
cfg.sub! /^System Up Time.*\n/, ''
comment cfg
end
+ #
+ # Show the card state.
+ #
cmd 'show card state' do |cfg|
comment cfg
end
- cmd 'show boot-messages' do |cfg|
- cfg.gsub! /\r/, ""
+ #
+ # 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"
+ comment cfg
+ end
+
+ #
+ # Show the running debug configuration.
+ #
+ cmd 'show debug' do |cfg|
comment cfg
end
- cmd 'admin display-config'
+ #
+ # Show the saved debug configuration (admin debug-save).
+ #
+ cmd 'file type config.dbg' do |cfg|
+ #
+ # Strip carriage returns.
+ #
+ cfg.gsub! /\r/, ''
+ comment cfg
+ end
+
+ #
+ # Show the running persistent indices.
+ #
+ cmd 'admin display-config index' do |cfg|
+ #
+ # Strip carriage returns.
+ #
+ cfg.gsub! /\r/, ''
+ comment cfg
+ end
+
+ #
+ # Show the running configuration.
+ #
+ cmd 'admin display-config' do |cfg|
+ #
+ # Strip carriage returns.
+ #
+ cfg.gsub! /\r/, ''
+ end
cfg :telnet do
username /^Login: /