summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/Supported-OS-Types.md6
-rw-r--r--lib/oxidized/model/aricentiss.rb45
-rw-r--r--lib/oxidized/model/edgecos.rb (renamed from lib/oxidized/model/supermicro.rb)6
3 files changed, 54 insertions, 3 deletions
diff --git a/docs/Supported-OS-Types.md b/docs/Supported-OS-Types.md
index a0ca66b..2e1de7c 100644
--- a/docs/Supported-OS-Types.md
+++ b/docs/Supported-OS-Types.md
@@ -139,7 +139,11 @@
* Siklu
* [EtherHaul](/lib/oxidized/model/siklu.rb)
* Supermicro
- * [Supermicro](/lib/oxidized/model/supermicro.rb)
+ * [SSE-G2252, G2252P](/lib/oxidized/model/edgecos.rb)
+ * [SSE-G48-TG4, G24-TG4](/lib/oxidized/model/aricentiss.rb)
+ * [SSE-X24S, X24SR, X3348S, X3348SR, X3348T,
+ * X3348TR](/lib/oxidized/model/aricentiss.rb)
+ * [SBM-GEM-X2C, GEM-X2C+, GEM-X3S+, XEM-X10SM](/lib/oxidized/model/aricentiss.rb)
* Symantec
* [Blue Coat ProxySG / Security Gateway OS (SGOS)](/lib/oxidized/model/sgos.rb)
* Trango Systems
diff --git a/lib/oxidized/model/aricentiss.rb b/lib/oxidized/model/aricentiss.rb
new file mode 100644
index 0000000..8675263
--- /dev/null
+++ b/lib/oxidized/model/aricentiss.rb
@@ -0,0 +1,45 @@
+class AricentISS < Oxidized::Model
+
+ prompt (/^(\e\[27m)?[ \r]*\w+# ?$/)
+
+ cfg :ssh do
+ post_login 'no cli pagignation'
+ pre_logout 'exit'
+ end
+
+ cmd :all do |cfg|
+ # * Drop first line that contains the command, and the last line that
+ # contains a prompt
+ # * Strip carriage returns
+ cfg.delete("\r").each_line.to_a[1..-2].join
+ end
+
+ cmd :secret do |cfg|
+ cfg.gsub(/^(snmp community) .*/, '\1 <hidden>')
+ end
+
+ cmd 'show system information' do |cfg|
+ cfg.sub! /^Device Up Time.*\n/, ''
+ cfg.delete! "\r"
+ comment(cfg).gsub(/ +$/, '')
+ end
+
+ cmd 'show running-config' do |cfg|
+ comment_next = 0
+ cfg.each_line.map { |l|
+ next '' if l.match /^Building configuration/
+
+ if l.match /^Switch ID.*Hardware Version.*Firmware Version/ then
+ comment_next = 2
+ end
+
+ if comment_next > 0 then
+ comment_next -= 1
+ next comment(l)
+ end
+
+ l
+ }.join.gsub(/ +$/, '')
+ end
+
+end
diff --git a/lib/oxidized/model/supermicro.rb b/lib/oxidized/model/edgecos.rb
index 361244c..bc205f5 100644
--- a/lib/oxidized/model/supermicro.rb
+++ b/lib/oxidized/model/edgecos.rb
@@ -1,4 +1,5 @@
-class Supermicro < Oxidized::Model
+class EdgeCOS < Oxidized::Model
+
comment '! '
cmd :secret do |cfg|
@@ -42,4 +43,5 @@ class Supermicro < Oxidized::Model
post_login 'terminal length 0'
pre_logout 'exit'
end
-end \ No newline at end of file
+
+end