summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/arbos.rb
diff options
context:
space:
mode:
authorWild Kat <wk@futureinquestion.net>2018-03-17 11:30:47 +0100
committerWild Kat <wk@futureinquestion.net>2018-03-17 11:30:47 +0100
commitf17736cabf0edda6788eff206aa12c9e35a22341 (patch)
tree113fa19d95571137018e5465e07f499cfa551bd1 /lib/oxidized/model/arbos.rb
parent81fc3a4b423d8ce9fe69def57007312a96db6f67 (diff)
parent7ecd5abe1cc2f2bbc6b29687352564cb7f087a5a (diff)
refactor supermicro support
Diffstat (limited to 'lib/oxidized/model/arbos.rb')
-rw-r--r--lib/oxidized/model/arbos.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/oxidized/model/arbos.rb b/lib/oxidized/model/arbos.rb
new file mode 100644
index 0000000..389f3f6
--- /dev/null
+++ b/lib/oxidized/model/arbos.rb
@@ -0,0 +1,27 @@
+class ARBOS < Oxidized::Model
+
+ # Arbor OS model #
+
+ prompt /^[\S\s]+\n([\w.@-]+[:\/#>]+)\s?$/
+ comment '# '
+
+ cmd 'system hardware' do |cfg|
+ cfg.gsub! /^Boot\ time\:\s.+/, '' # Remove boot timer
+ cfg.gsub! /^Load\ averages\:\s.+/, '' # Remove CPU load info
+ cfg = cfg.each_line.to_a[2..-1].join
+ comment cfg
+ end
+
+ cmd 'system version' do |cfg|
+ comment cfg
+ end
+
+ cmd 'config show' do |cfg|
+ cfg
+ end
+
+ cfg :ssh do
+ exec true
+ pre_logout 'exit'
+ end
+end