summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/Model-Notes/README.md3
-rw-r--r--docs/Model-Notes/XGS4600-Zyxel.md14
-rw-r--r--lib/oxidized/model/zynoscli.rb36
3 files changed, 51 insertions, 2 deletions
diff --git a/docs/Model-Notes/README.md b/docs/Model-Notes/README.md
index 890ac7d..99c8291 100644
--- a/docs/Model-Notes/README.md
+++ b/docs/Model-Notes/README.md
@@ -13,7 +13,6 @@ 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)|23 Jan 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 17cb2b5..c24bed6 100644
--- a/docs/Model-Notes/XGS4600-Zyxel.md
+++ b/docs/Model-Notes/XGS4600-Zyxel.md
@@ -20,6 +20,20 @@ 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!
Back to [Model-Notes](README.md)
diff --git a/lib/oxidized/model/zynoscli.rb b/lib/oxidized/model/zynoscli.rb
new file mode 100644
index 0000000..ae64b04
--- /dev/null
+++ b/lib/oxidized/model/zynoscli.rb
@@ -0,0 +1,36 @@
+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 stacking'
+
+ cmd 'show version'
+
+ 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