diff options
| author | Jason Ackley <jason@ackley.net> | 2018-02-27 08:58:59 -0600 | 
|---|---|---|
| committer | Neil Lathwood <neil@lathwood.co.uk> | 2018-02-27 14:58:59 +0000 | 
| commit | 72397c4f344ab97fe3db1e381a3e5e1b1a935c62 (patch) | |
| tree | 8d8f6a3230e0b81445fba28802ad1c18626b8d65 | |
| parent | a42d1bad82e37975d674b560b18bc153a2786669 (diff) | |
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
| -rw-r--r-- | docs/Model-Notes/ArbOS.md | 10 | ||||
| -rw-r--r-- | docs/Model-Notes/README.md | 1 | ||||
| -rw-r--r-- | docs/Supported-OS-Types.md | 2 | ||||
| -rw-r--r-- | lib/oxidized/model/arbos.rb | 27 | 
4 files changed, 40 insertions, 0 deletions
diff --git a/docs/Model-Notes/ArbOS.md b/docs/Model-Notes/ArbOS.md new file mode 100644 index 0000000..0f5b628 --- /dev/null +++ b/docs/Model-Notes/ArbOS.md @@ -0,0 +1,10 @@ +Arbor Networks ArbOS notes +========================== + +If you are running ArbOS version 7 or lower then you may need to update the model to remove `exec true`: + +``` +  cfg :ssh do +    pre_logout 'exit' +  end +``` diff --git a/docs/Model-Notes/README.md b/docs/Model-Notes/README.md index 6a64058..9d7db32 100644 --- a/docs/Model-Notes/README.md +++ b/docs/Model-Notes/README.md @@ -12,6 +12,7 @@ Use the table below for more information on the Vendor/Model caveats.  Vendor          | Model           |Updated  ----------------|-----------------|----------------  3COM|[Comware](Comware.md)|15 Feb 2018 +Arbor Networks|[ArbOS](ArbOS.md)|27 Feb 2018  Huawei|[VRP](VRP-Huawei.md)|17 Nov 2017  Juniper|[MX/QFX/EX/SRX/J Series](JunOS.md)|18 Jan 2018  Xyzel|[XGS4600 Series](XGS4600-Zyxel.md)|23 Jan 2018 diff --git a/docs/Supported-OS-Types.md b/docs/Supported-OS-Types.md index a12f5ef..d6d718f 100644 --- a/docs/Supported-OS-Types.md +++ b/docs/Supported-OS-Types.md @@ -17,6 +17,8 @@     * [BreezeACCESS](/lib/oxidized/model/alvarion.rb)   * APC     * [AOS](/lib/oxidized/model/apc_aos.rb) + * Arbor Networks +   * [ArbOS](/lib/oxidized/model/arbos.rb)   * Arista     * [EOS](/lib/oxidized/model/eos.rb)   * Arris 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  | 
