From 0a64107e7542df30e72d9f007f02007660469146 Mon Sep 17 00:00:00 2001 From: Viktor Kertesz Date: Mon, 31 Dec 2018 20:31:24 +0100 Subject: [PATCH] `cisco_ios_show_dot1x_all`: Add new template (#308) --- templates/cisco_ios_show_dot1x_all.template | 45 +++++++++++++++++++ templates/index | 1 + .../cisco_ios_show_dot1x_all.parsed | 40 +++++++++++++++++ .../cisco_ios_show_dot1x_all.raw | 37 +++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 templates/cisco_ios_show_dot1x_all.template create mode 100644 tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.parsed create mode 100644 tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.raw diff --git a/templates/cisco_ios_show_dot1x_all.template b/templates/cisco_ios_show_dot1x_all.template new file mode 100644 index 0000000000..376dd0e9dc --- /dev/null +++ b/templates/cisco_ios_show_dot1x_all.template @@ -0,0 +1,45 @@ +Value Filldown SYSAUTHCONTROL (\w+) +Value Filldown DOT1XVERSION (\d) +Value Filldown CRITICAL_RECOVERY_DELAY (\d+) +Value Filldown CRITICAL_EAPOL (\w+) +Value Required INTERFACE (\S+) +Value PAE (\w+) +Value PORTCONTROL (\w+) +Value CONTROLDIRECTION (\w+) +Value HOSTMODE (\w+) +Value REAUTHENTICATION (\w+) +Value QUIETPERIOD (\d+) +Value SERVERTIMEOUT (\d+) +Value SUPPTIMEOUT (\d+) +Value REAUTHPERIOD (\d+) +Value REAUTHMAX (\d+) +Value MASREQ (\d+) +Value TXPERIOD (\d+) +Value RATELIMITPERIOD (\d+) + +Start + ^Sysauthcontrol\s+${SYSAUTHCONTROL} + ^Dot1x Protocol Version\s+${DOT1XVERSION} + ^Critical Recovery Delay\s+${CRITICAL_RECOVERY_DELAY} + ^Critical EAPOL\s+${CRITICAL_EAPOL} + ^$$ -> Interfaces + +Interfaces + ^Dot1x Info for\s -> Continue.Record + ^Dot1x Info for\s${INTERFACE} + ^PAE\s+=\s${PAE} + ^PortControl\s+=\s${PORTCONTROL} + ^ControlDirection\s+=\s${CONTROLDIRECTION} + ^HostMode\s+=\s${HOSTMODE} + ^ReAuthentication\s+=\s${REAUTHENTICATION} + ^QuietPeriod\s+=\s${QUIETPERIOD} + ^ServerTimeout\s+=\s${SERVERTIMEOUT} + ^SuppTimeout\s+=\s${SUPPTIMEOUT} + ^ReAuthPeriod\s+=\s${REAUTHPERIOD} + ^ReAuthMax\s+=\s${REAUTHMAX} + ^MaxReq\s+=\s${MASREQ} + ^TxPeriod\s+=\s${TXPERIOD} + ^RateLimitPeriod\s+=\s+${RATELIMITPERIOD} + ^-+\s*$$ + ^\s*$$ + ^. -> Error diff --git a/templates/index b/templates/index index 0280a05e90..3e0cb3d19b 100644 --- a/templates/index +++ b/templates/index @@ -154,6 +154,7 @@ cisco_ios_show_isdn_status.template, .*, cisco_ios, sh[[ow]] isd[[n]] st[[atus]] cisco_ios_show_interfaces.template, .*, cisco_ios, sh[[ow]] int[[erfaces]] cisco_ios_show_redundancy.template, .*, cisco_ios, sh[[ow]] redu[[ndancy]] cisco_ios_show_vtp_status.template, .*, cisco_ios, sh[[ow]] vtp stat[[us]] +cisco_ios_show_dot1x_all.template, .*, cisco_ios, sh[[ow]] dot1x a[[ll]] cisco_ios_show_inventory.template, .*, cisco_ios, sh[[ow]] inven[[tory]] cisco_ios_show_ip_mroute.template, .*, cisco_ios, sh[[ow]] ip mr[[oute]] cisco_ios_show_route-map.template, .*, cisco_ios, sh[[ow]] route-m[[ap]] diff --git a/tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.parsed b/tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.parsed new file mode 100644 index 0000000000..0bd2bfbb53 --- /dev/null +++ b/tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.parsed @@ -0,0 +1,40 @@ +--- +parsed_sample: + +- interface : "Ethernet1/0" + reauthentication : "Disabled" + sysauthcontrol : "Disabled" + servertimeout : "30" + supptimeout : "30" + dot1xversion : "2" + hostmode : "SINGLE_HOST" + critical_recovery_delay : "100" + reauthmax : "2" + quietperiod : "60" + reauthperiod : "3600" + portcontrol : "AUTO" + txperiod : "30" + masreq : "2" + ratelimitperiod : "0" + critical_eapol : "Disabled" + controldirection : "Both" + pae : "AUTHENTICATOR" +- interface : "Ethernet1/2" + reauthentication : "Disabled" + sysauthcontrol : "Disabled" + servertimeout : "30" + supptimeout : "30" + dot1xversion : "2" + hostmode : "SINGLE_HOST" + critical_recovery_delay : "100" + reauthmax : "2" + quietperiod : "60" + reauthperiod : "3600" + portcontrol : "AUTO" + txperiod : "30" + masreq : "2" + ratelimitperiod : "0" + critical_eapol : "Disabled" + controldirection : "Both" + pae : "AUTHENTICATOR" + diff --git a/tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.raw b/tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.raw new file mode 100644 index 0000000000..06c5dbd100 --- /dev/null +++ b/tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.raw @@ -0,0 +1,37 @@ +Sysauthcontrol Disabled +Dot1x Protocol Version 2 +Critical Recovery Delay 100 +Critical EAPOL Disabled + +Dot1x Info for Ethernet1/0 +----------------------------------- +PAE = AUTHENTICATOR +PortControl = AUTO +ControlDirection = Both +HostMode = SINGLE_HOST +ReAuthentication = Disabled +QuietPeriod = 60 +ServerTimeout = 30 +SuppTimeout = 30 +ReAuthPeriod = 3600 (Locally configured) +ReAuthMax = 2 +MaxReq = 2 +TxPeriod = 30 +RateLimitPeriod = 0 + +Dot1x Info for Ethernet1/2 +----------------------------------- + +PAE = AUTHENTICATOR +PortControl = AUTO +ControlDirection = Both +HostMode = SINGLE_HOST +ReAuthentication = Disabled +QuietPeriod = 60 +ServerTimeout = 30 +SuppTimeout = 30 +ReAuthPeriod = 3600 (Locally configured) +ReAuthMax = 2 +MaxReq = 2 +TxPeriod = 30 +RateLimitPeriod = 0