From 6890754f0a579fc9be3912113dcfe510b2837f7c Mon Sep 17 00:00:00 2001 From: CppMonkey Date: Thu, 1 Feb 2018 17:39:00 +0000 Subject: Initial commit for SSH/Telnet on Xyzel XGS4600 series --- docs/Model-Notes/README.md | 2 +- docs/Model-Notes/XGS4600-Zyxel.md | 17 +++++++++++++++++ lib/oxidized/model/zynoscli.rb | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 lib/oxidized/model/zynoscli.rb diff --git a/docs/Model-Notes/README.md b/docs/Model-Notes/README.md index f51ed80..a2ac681 100644 --- a/docs/Model-Notes/README.md +++ b/docs/Model-Notes/README.md @@ -13,7 +13,7 @@ Vendor | Model |Updated ----------------|-----------------|---------------- 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 +Xyzel|[XGS4600 Series](XGS4600-Zyxel.md)|1 Feb 2018 If you discover additional caveats or problems please make sure to consult the [GitHub issues for oxidized](https://github.com/ytti/oxidized/issues) known issues. diff --git a/docs/Model-Notes/XGS4600-Zyxel.md b/docs/Model-Notes/XGS4600-Zyxel.md index 0ff2e7d..6fb6daf 100644 --- a/docs/Model-Notes/XGS4600-Zyxel.md +++ b/docs/Model-Notes/XGS4600-Zyxel.md @@ -18,6 +18,23 @@ input: passive: false ``` + +## SSH/TelNet + +Below is the table from the XGS4600 CLI Reference Guide (Version 3.79~4.50 Edition 1, 07/2017) +Take this table with a pink of salt, level 3 will not allow _show running-config_! +Privilege Level | Types of commands at this privilege level +----------------|------------------------------------------- +0|Display basic system information. +3|Display configuration or status. +13|Configure features except for login accounts, SNMP user accounts, the authentication +method sequence and authorization settings, multiple logins, administrator and enable +passwords, and configuration information display. +14|Configure login accounts, SNMP user accounts, the authentication method sequence and +authorization settings, multiple logins, and administrator and enable passwords, and display +configuration information. + + Oxidized can now retrieve your configuration! diff --git a/lib/oxidized/model/zynoscli.rb b/lib/oxidized/model/zynoscli.rb new file mode 100644 index 0000000..9f29a16 --- /dev/null +++ b/lib/oxidized/model/zynoscli.rb @@ -0,0 +1,35 @@ +class ZyNOSCLI < Oxidized::Model + + # Used in Zyxel DSLAMs, such as SAM1316 + + # Typical prompt "XGS4600#" + prompt /^([\w.@()-]+[#>]\s\e7)$/ + comment ';; ' + + cmd :all do |cfg| + cfg.gsub! /^.*\e7/, '' + end + + cmd 'show running-config' + + cfg :telnet do + username /^User name:/i + password /^Password:/i + end + + cfg :telnet, :ssh do + if vars :enable + post_login do + send "enable\n" + # Interpret enable: true as meaning we won't be prompted for a password + unless vars(:enable).is_a? TrueClass + expect /[pP]assword:\s?$/ + send vars(:enable) + "\n" + end + expect /^.+[#]$/ + end + end + pre_logout 'exit' + end + +end -- cgit v1.2.1 From 058bf1d9d19ddbcebd304c56c0a0aec1a271a036 Mon Sep 17 00:00:00 2001 From: CppMonkey Date: Thu, 1 Feb 2018 17:43:55 +0000 Subject: Fixed privilege table not displaying correctly --- docs/Model-Notes/XGS4600-Zyxel.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Model-Notes/XGS4600-Zyxel.md b/docs/Model-Notes/XGS4600-Zyxel.md index 6fb6daf..072ac1a 100644 --- a/docs/Model-Notes/XGS4600-Zyxel.md +++ b/docs/Model-Notes/XGS4600-Zyxel.md @@ -23,6 +23,7 @@ input: Below is the table from the XGS4600 CLI Reference Guide (Version 3.79~4.50 Edition 1, 07/2017) Take this table with a pink of salt, level 3 will not allow _show running-config_! + Privilege Level | Types of commands at this privilege level ----------------|------------------------------------------- 0|Display basic system information. -- cgit v1.2.1 From 70b83e31ae40662b2d93aae0b7491af2464aaef1 Mon Sep 17 00:00:00 2001 From: KodApa85 Date: Thu, 1 Feb 2018 17:49:32 +0000 Subject: removed return characters, fixing the table --- docs/Model-Notes/XGS4600-Zyxel.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/Model-Notes/XGS4600-Zyxel.md b/docs/Model-Notes/XGS4600-Zyxel.md index 072ac1a..33953ea 100644 --- a/docs/Model-Notes/XGS4600-Zyxel.md +++ b/docs/Model-Notes/XGS4600-Zyxel.md @@ -28,12 +28,8 @@ Privilege Level | Types of commands at this privilege level ----------------|------------------------------------------- 0|Display basic system information. 3|Display configuration or status. -13|Configure features except for login accounts, SNMP user accounts, the authentication -method sequence and authorization settings, multiple logins, administrator and enable -passwords, and configuration information display. -14|Configure login accounts, SNMP user accounts, the authentication method sequence and -authorization settings, multiple logins, and administrator and enable passwords, and display -configuration information. +13|Configure features except for login accounts, SNMP user accounts, the authentication method sequence and authorization settings, multiple logins, administrator and enable passwords, and configuration information display. +14|Configure login accounts, SNMP user accounts, the authentication method sequence and authorization settings, multiple logins, and administrator and enable passwords, and display configuration information. Oxidized can now retrieve your configuration! -- cgit v1.2.1 From 1b2a5721b66fbc11a182da1bd11fb7f7eb1b0e9b Mon Sep 17 00:00:00 2001 From: CppMonkey Date: Tue, 20 Mar 2018 09:51:15 +0000 Subject: Merged latest changes from ytti/oxidized --- docs/Model-Notes/README.md | 14 ++++++-------- docs/Model-Notes/XGS4600-Zyxel.md | 12 +++++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/Model-Notes/README.md b/docs/Model-Notes/README.md index a2ac681..12133fb 100644 --- a/docs/Model-Notes/README.md +++ b/docs/Model-Notes/README.md @@ -1,19 +1,17 @@ - - Model Notes -======================== - +=========== -This directory contains implemention notes and caveats to assist you in your oxidized deployment. +This directory contains implementation notes and caveats to assist you in your oxidized deployment. Use the table below for more information on the Vendor/Model caveats. - Vendor | Model |Updated ----------------|-----------------|---------------- +3COM|[Comware](Comware.md)|15 Feb 2018 +AireOS|[AireOS](AireOS.md)|29 Nov 2017 +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)|1 Feb 2018 - +Zyxel|[XGS4600 Series](XGS4600-Zyxel.md)|1 Feb 2018 If you discover additional caveats or problems please make sure to consult the [GitHub issues for oxidized](https://github.com/ytti/oxidized/issues) known issues. diff --git a/docs/Model-Notes/XGS4600-Zyxel.md b/docs/Model-Notes/XGS4600-Zyxel.md index 33953ea..3c69cee 100644 --- a/docs/Model-Notes/XGS4600-Zyxel.md +++ b/docs/Model-Notes/XGS4600-Zyxel.md @@ -1,18 +1,20 @@ ZynOS Configuration -======================== +=================== ## FTP + FTP access is only possible as admin, other users can login but cannot pull the files. For the XGS4600 series the config file is _config_ and not _config-0_ -The following line in _oxidized/lib/oxidized/model/zynos.rb_ with need changing -``` - cmd 'config-0' +The following line in _oxidized/lib/oxidized/model/zynos.rb_ will need changing +```text + cmd 'config-0' ``` The inclusion of an extra ftp option is also require. Within _input_ add the following -``` + +```yaml input: ftp: passive: false -- cgit v1.2.1 From 97aa0535a0c8c237c1ccb7a1683d5f6faa1f0339 Mon Sep 17 00:00:00 2001 From: CppMonkey Date: Tue, 20 Mar 2018 09:53:41 +0000 Subject: Added more commands Shows more details. Confirms stacking config (Ring/Chain) Allows tracking of firmware on ras0 and ras1 --- lib/oxidized/model/zynoscli.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/oxidized/model/zynoscli.rb b/lib/oxidized/model/zynoscli.rb index 9f29a16..ae64b04 100644 --- a/lib/oxidized/model/zynoscli.rb +++ b/lib/oxidized/model/zynoscli.rb @@ -1,5 +1,4 @@ class ZyNOSCLI < Oxidized::Model - # Used in Zyxel DSLAMs, such as SAM1316 # Typical prompt "XGS4600#" @@ -9,6 +8,9 @@ class ZyNOSCLI < Oxidized::Model cmd :all do |cfg| cfg.gsub! /^.*\e7/, '' end + cmd 'show stacking' + + cmd 'show version' cmd 'show running-config' @@ -31,5 +33,4 @@ class ZyNOSCLI < Oxidized::Model end pre_logout 'exit' end - end -- cgit v1.2.1 From b1d2d69c1fa0a122b3a99687721b35c99d25aab5 Mon Sep 17 00:00:00 2001 From: KodApa85 Date: Fri, 27 Apr 2018 14:53:05 +0100 Subject: Corrected spelling mistake --- docs/Model-Notes/XGS4600-Zyxel.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Model-Notes/XGS4600-Zyxel.md b/docs/Model-Notes/XGS4600-Zyxel.md index c24bed6..8b58ed8 100644 --- a/docs/Model-Notes/XGS4600-Zyxel.md +++ b/docs/Model-Notes/XGS4600-Zyxel.md @@ -24,7 +24,7 @@ input: ## SSH/TelNet Below is the table from the XGS4600 CLI Reference Guide (Version 3.79~4.50 Edition 1, 07/2017) -Take this table with a pink of salt, level 3 will not allow _show running-config_! +Take this table with a pinch of salt, level 3 will not allow _show running-config_! Privilege Level | Types of commands at this privilege level ----------------|------------------------------------------- -- cgit v1.2.1 From be6872a004f3422471edcc3cab8479e7adff07dd Mon Sep 17 00:00:00 2001 From: KodApa85 Date: Fri, 27 Apr 2018 14:55:13 +0100 Subject: Removed accidental deletion --- docs/Model-Notes/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Model-Notes/README.md b/docs/Model-Notes/README.md index 99c8291..993eb77 100644 --- a/docs/Model-Notes/README.md +++ b/docs/Model-Notes/README.md @@ -13,6 +13,7 @@ Arbor Networks|[ArbOS](ArbOS.md)|27 Feb 2018 Arista|[EOS](EOS.md)|05 Feb 2018 Huawei|[VRP](VRP-Huawei.md)|17 Nov 2017 Juniper|[MX/QFX/EX/SRX/J Series](JunOS.md)|18 Jan 2018 +Netgear|[Netgear](Netgear.md)|11 Apr 2018 Zyxel|[XGS4600 Series](XGS4600-Zyxel.md)|1 Feb 2018 If you discover additional caveats or problems please make sure to consult the [GitHub issues for oxidized](https://github.com/ytti/oxidized/issues) known issues. -- cgit v1.2.1