diff options
author | Neil Lathwood <neil@lathwood.co.uk> | 2018-03-01 11:17:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-01 11:17:55 +0000 |
commit | 5ec132a164af3b29ed35c703bda213f3e21a2d6b (patch) | |
tree | 484de32ab1553aebf9c81e5fe264427596b65975 /lib/oxidized/model/arbos.rb | |
parent | 9156243b9debfc0bc2b05dfe98a910ce5153bf49 (diff) | |
parent | 34cdbeb75f3c74d803fb60c509fc06e4f6365f0c (diff) |
Merge branch 'master' into ssh-auth-methods
Diffstat (limited to 'lib/oxidized/model/arbos.rb')
-rw-r--r-- | lib/oxidized/model/arbos.rb | 27 |
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 |