summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/arbos.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/arbos.rb')
-rw-r--r--lib/oxidized/model/arbos.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/oxidized/model/arbos.rb b/lib/oxidized/model/arbos.rb
new file mode 100644
index 0000000..51b269d
--- /dev/null
+++ b/lib/oxidized/model/arbos.rb
@@ -0,0 +1,26 @@
+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