From 4da2e3fd5466c5f0b3131370f2184774df66c24f Mon Sep 17 00:00:00 2001 From: Nick Hilliard Date: Fri, 9 Feb 2024 23:50:30 +0000 Subject: [PATCH] Added support for IP Infusion OcNOS --- CHANGELOG.md | 1 + docs/Supported-OS-Types.md | 1 + lib/oxidized/model/ocnos.rb | 42 +++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 lib/oxidized/model/ocnos.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fc05e805..c06aad816 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - added SCP input (@aeiodelic) - Added `linux/arm64` and `linux/amd64` platforms to Docker build/publish. (@disaac) - Added verion info for Vyatta (@systeembeheerder) +- model for IP Infusion OcNOS ## Changed - tp-link: fixed enable mode post login entrance (@mirackle-spb) diff --git a/docs/Supported-OS-Types.md b/docs/Supported-OS-Types.md index f3d028d78..30c68c502 100644 --- a/docs/Supported-OS-Types.md +++ b/docs/Supported-OS-Types.md @@ -108,6 +108,7 @@ |Huawei |VRP |[vrp](/lib/oxidized/model/vrp.rb) | |[VRP-Huawei](Model-Notes/VRP-Huawei.md) | |SmartAX series |[smartax](/lib/oxidized/model/smartax.rb) | |[SmartAX-Huawei](Model-Notes/SmartAX-Huawei.md) |Icotera |6400 series |[icotera](/lib/oxidized/model/icotera.rb) +|IP Infusion |OcNOS |[ocnos](/lib/oxidized/model/ocnos.rb) |Juniper |JunOS |[junos](/lib/oxidized/model/junos.rb) | |[MX/QFX/EX/SRX/J Series](Model-Notes/JunOS.md) | |ScreenOS (Netscreen) |[screenos](/lib/oxidized/model/screenos.rb) |LANCOM Systems GmbH |LCOS |[lancom](/lib/oxidized/model/lancom.rb) diff --git a/lib/oxidized/model/ocnos.rb b/lib/oxidized/model/ocnos.rb new file mode 100644 index 000000000..8aa16d6ab --- /dev/null +++ b/lib/oxidized/model/ocnos.rb @@ -0,0 +1,42 @@ +class OcNOS < Oxidized::Model + using Refinements + + prompt /([\w.@-]+[#>]\s?)$/ + comment '# ' + + cfg :ssh do + post_login 'terminal length 0' + pre_logout do + send "disable\r" + send "logout\r" + end + end + + cmd :all do |cfg| + cfg.lines.to_a[1..-2].join + end + + cmd 'show version' do |cfg| + comment cfg + end + + cmd 'show system fru' do |cfg| + comment cfg + end + + cmd 'show system-information board-info' do |cfg| + comment cfg + end + + cmd 'show forwarding profile limit' do |cfg| + comment cfg + end + + cmd 'show license' do |cfg| + comment cfg + end + + cmd 'show running-config' do |cfg| + cfg + end +end