From 72397c4f344ab97fe3db1e381a3e5e1b1a935c62 Mon Sep 17 00:00:00 2001 From: Jason Ackley Date: Tue, 27 Feb 2018 08:58:59 -0600 Subject: model: Added support for ArbOS from Arbor Networks. (#1096) * Basic support for ArbOS from Arbor Networks. ArbOS is the generic name for Arbor Networks (https://www.arbornetworks.com/) OS that runs on some of their devices. Found and imported from https://github.com/claranet/oxidized . Credit to Claranet for the creation. Locally validated on Peakflow SP v8.2+ The module is quite simple as the command 'config show' automatically disables pagination. There is a pagination-enabled version of the command as well. * Added model notes for ArbOS --- lib/oxidized/model/arbos.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lib/oxidized/model/arbos.rb (limited to 'lib/oxidized') 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 -- cgit v1.2.1 From 34cdbeb75f3c74d803fb60c509fc06e4f6365f0c Mon Sep 17 00:00:00 2001 From: Zachary Puls Date: Tue, 27 Feb 2018 09:22:32 -0600 Subject: model: Added "commands" flag to "show configuration" on VyOS/Vyatta/EdgeOS (#1164) --- lib/oxidized/model/edgeos.rb | 2 +- lib/oxidized/model/vyatta.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/edgeos.rb b/lib/oxidized/model/edgeos.rb index 2a8d663..bb0aab5 100644 --- a/lib/oxidized/model/edgeos.rb +++ b/lib/oxidized/model/edgeos.rb @@ -13,7 +13,7 @@ class Edgeos < Oxidized::Model cfg end - cmd 'show configuration | no-more' + cmd 'show configuration commands | no-more' cfg :telnet do username /login:\s/ diff --git a/lib/oxidized/model/vyatta.rb b/lib/oxidized/model/vyatta.rb index 8d977aa..aa0bc74 100644 --- a/lib/oxidized/model/vyatta.rb +++ b/lib/oxidized/model/vyatta.rb @@ -13,7 +13,7 @@ class Vyatta < Oxidized::Model cfg end - cmd 'show configuration | no-more' + cmd 'show configuration commands | no-more' cfg :telnet do username /login:\s/ -- cgit v1.2.1