summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Aksola <anton.aksola@nebula.fi>2014-04-09 17:26:01 +0300
committerAnton Aksola <anton.aksola@nebula.fi>2014-04-09 17:26:01 +0300
commit9766171e6d9b598e1858708a0dfe29707837b6cf (patch)
tree5cdbedfe227919dc0a8c38c18f462371ce52c862
parentb701e8d24d0367fbf9d6de90aa7a97c70bb60b3d (diff)
add model for ALU TiMOS
tested on SR and SAS routers
-rw-r--r--lib/oxidized/model/timos.rb45
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/oxidized/model/timos.rb b/lib/oxidized/model/timos.rb
new file mode 100644
index 0000000..dc28580
--- /dev/null
+++ b/lib/oxidized/model/timos.rb
@@ -0,0 +1,45 @@
+class TiMOS < Oxidized::Model
+
+ # Alcatel-Lucent TiMOS (Timetra)
+ # used in SR/ESS/SAS routers
+
+ comment '# '
+
+ prompt /^([-\w\.:>\*]+\s?[#>]\s?)$/
+
+ cmd :all do |cfg, cmdstring|
+ new_cfg = comment "COMMAND: #{cmdstring}\n"
+ new_cfg << cfg.each_line.to_a[1..-2].join
+ end
+
+ cmd 'show bof' do |cfg|
+ comment cfg
+ end
+
+ cmd 'show system information' do |cfg|
+ # strip uptime
+ cfg.sub! /^System Up Time.*\n/, ''
+ comment cfg
+ end
+
+ cmd 'show card state' do |cfg|
+ comment cfg
+ end
+
+ cmd 'show boot-messages' do |cfg|
+ cfg.gsub! /\r/, ""
+ comment cfg
+ end
+
+ cmd 'admin display-config'
+
+ cfg :telnet do
+ username /^Login: /
+ password /^Password: /
+ end
+
+ cfg :telnet, :ssh do
+ post_login 'environment no more'
+ pre_logout 'logout'
+ end
+end