Skip to content

Commit

Permalink
Enhancemnt: IOS show tacacs - add name capture group (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhkamath authored Dec 2, 2020
1 parent b848b09 commit 8c00e5b
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/cisco_ios_show_tacacs.textfsm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Value TACACS_SERVER_NAME (.+?)
Value TACACS_SERVER (.+?)
Value SERVER_PORT (\d+)
Value SOCKET_OPENS (\d+)
Expand All @@ -13,6 +14,7 @@ Value PACKET_RECEIVED (\d+)
Start
^Tacacs -> Record
^\s+Server\s+address:\s+${TACACS_SERVER}\s*$$
^\s+Server\s+name:\s+${TACACS_SERVER_NAME}\s*$$
^\s+Server\s+port:\s+${SERVER_PORT}\s*$$
^\s+Socket\s+opens:\s+ ${SOCKET_OPENS}\s*$$
^\s+Socket\s+closes:\s+${SOCKET_CLOSES}\s*$$
Expand Down
2 changes: 2 additions & 0 deletions tests/cisco_ios/show_tacacs/cisco_ios_show_tacacs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
parsed_sample:
- tacacs_server: "10.1.1.140"
tacacs_server_name: ""
server_port: "49"
socket_opens: "138084"
socket_closes: "137992"
Expand All @@ -11,6 +12,7 @@ parsed_sample:
packets_sent: "147753"
packet_received: "147693"
- tacacs_server: "10.2.1.140"
tacacs_server_name: ""
server_port: "49"
socket_opens: "2027"
socket_closes: "2027"
Expand Down
26 changes: 26 additions & 0 deletions tests/cisco_ios/show_tacacs/cisco_ios_show_tacacs_server_name.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Tacacs+ Server - public :
Server name: TACACS_ABC
Server address: 10.1.1.141
Server port: 49
Socket opens: 146715
Socket closes: 146715
Socket aborts: 0
Socket errors: 0
Socket Timeouts: 0
Failed Connect Attempts: 114
Total Packets Sent: 166094
Total Packets Recv: 166094


Tacacs+ Server - public :
Server name: TACACS_XYZ
Server address: 10.2.1.141
Server port: 49
Socket opens: 2640
Socket closes: 2640
Socket aborts: 0
Socket errors: 0
Socket Timeouts: 0
Failed Connect Attempts: 0
Total Packets Sent: 2954
Total Packets Recv: 2953
24 changes: 24 additions & 0 deletions tests/cisco_ios/show_tacacs/cisco_ios_show_tacacs_server_name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
parsed_sample:
- tacacs_server: "10.1.1.141"
tacacs_server_name: "TACACS_ABC"
server_port: "49"
socket_opens: "146715"
socket_closes: "146715"
socket_aborts: "0"
socket_errors: "0"
socket_timeouts: "0"
failed_connections: "114"
packets_sent: "166094"
packet_received: "166094"
- tacacs_server: "10.2.1.141"
tacacs_server_name: "TACACS_XYZ"
server_port: "49"
socket_opens: "2640"
socket_closes: "2640"
socket_aborts: "0"
socket_errors: "0"
socket_timeouts: "0"
failed_connections: "0"
packets_sent: "2954"
packet_received: "2953"

0 comments on commit 8c00e5b

Please sign in to comment.