Skip to content

Commit

Permalink
cisco_ios_show_dot1x_all: Add new template (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
realvitya authored and jmcgill298 committed Dec 31, 2018
1 parent 8cdadd5 commit 0a64107
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 0 deletions.
45 changes: 45 additions & 0 deletions templates/cisco_ios_show_dot1x_all.template
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
40 changes: 40 additions & 0 deletions tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.parsed
Original file line number Diff line number Diff line change
@@ -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"

37 changes: 37 additions & 0 deletions tests/cisco_ios/show_dot1x_all/cisco_ios_show_dot1x_all.raw
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0a64107

Please sign in to comment.