From 623d538a0f8744a11ba285ea060e62ea71011c79 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Thu, 16 Mar 2017 01:34:12 -0300 Subject: Support for Cisco NGA. --- README.md | 1 + lib/oxidized/model/cisconga.rb | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lib/oxidized/model/cisconga.rb diff --git a/README.md b/README.md index 0d35ab2..2317b5e 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen * [CatOS](lib/oxidized/model/catos.rb) * [IOS](lib/oxidized/model/ios.rb) * [IOSXR](lib/oxidized/model/iosxr.rb) + * [NGA](lib/oxidized/model/cisconga.rb) * [NXOS](lib/oxidized/model/nxos.rb) * [SMB (Nikola series)](lib/oxidized/model/ciscosmb.rb) * Citrix diff --git a/lib/oxidized/model/cisconga.rb b/lib/oxidized/model/cisconga.rb new file mode 100644 index 0000000..37cb4e4 --- /dev/null +++ b/lib/oxidized/model/cisconga.rb @@ -0,0 +1,19 @@ +class CiscoNGA < Oxidized::Model + + comment '# ' + prompt /([\w.@-]+[#>]\s?)$/ + + cmd 'show version' do |cfg| + comment cfg + end + + cmd 'show configuration' do |cfg| + comment cfg + end + + cfg :ssh do + post_login 'terminal length 0' + pre_logout 'exit' + end + +end -- cgit v1.2.1 From ba150fa65989bc12db7cc9af3d6d934b07a40c84 Mon Sep 17 00:00:00 2001 From: Everton Marques Date: Thu, 16 Mar 2017 01:52:40 -0300 Subject: Do not comment out result for show configuration. --- lib/oxidized/model/cisconga.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oxidized/model/cisconga.rb b/lib/oxidized/model/cisconga.rb index 37cb4e4..73fb51c 100644 --- a/lib/oxidized/model/cisconga.rb +++ b/lib/oxidized/model/cisconga.rb @@ -8,7 +8,7 @@ class CiscoNGA < Oxidized::Model end cmd 'show configuration' do |cfg| - comment cfg + cfg end cfg :ssh do -- cgit v1.2.1