summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r--lib/oxidized/model/enterasys.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/oxidized/model/enterasys.rb b/lib/oxidized/model/enterasys.rb
new file mode 100644
index 0000000..708d380
--- /dev/null
+++ b/lib/oxidized/model/enterasys.rb
@@ -0,0 +1,30 @@
+class Enterasys < Oxidized::Model
+
+ # Enterasys B3/C3 models #
+
+ prompt /^.+\w\(su\)->\s?$/
+
+ comment '!'
+
+ cmd :all do |cfg|
+ cfg.each_line.to_a[2..-3].map{|line|line.delete("\r").rstrip}.join("\n") + "\n"
+ end
+
+ cmd 'show system hardware' do |cfg|
+ comment cfg
+ end
+
+ cmd 'show config' do |cfg|
+ cfg.gsub! /^This command shows non-default configurations only./, ''
+ cfg.gsub! /^Use 'show config all' to show both default and non-default configurations./, ''
+ cfg.gsub! /^!|#.*/, ''
+ cfg.gsub! /^$\n/, ''
+
+ cfg
+ end
+
+ cfg :ssh do
+ pre_logout 'exit'
+ end
+
+end