Skip to content

Commit f0148e2

Browse files
rsaurermjbear
andauthored
Add cisco_ios_show_cts_pacs (#2171)
* added cisco_ios_show_cts_pacs * Combine cts and sga-binos lines * Update ntc_templates/templates/cisco_ios_show_cts_pacs.textfsm Co-authored-by: Michael Bear <[email protected]> * updated yaml test files * added edge cases * proposal: split CREDENTIAL_LIFETIME string into structured data * updated regex for WEEKDAY + added test case missing day of week * Merge PacsInfo State into Start State/section * Update leading ws reqid/refresh delayed lines A few other raw output lines have a zero or more white space regex at the beginning of the line. Reqid and refresh delayed have been updated to mirror the existing convention. --------- Co-authored-by: Michael Bear <[email protected]>
1 parent 1459a0e commit f0148e2

16 files changed

+224
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Value AID (\S+)
2+
Value PAC_TYPE (.*)
3+
Value INITIATOR_ID (\S+)
4+
Value AUTHENTICATOR_ID_INFO (.*)
5+
Value TIME (\d+:\d+:\d+)
6+
Value TIMEZONE (\w+)
7+
Value WEEKDAY (Mon|Tue|Wed|Thu|Fri|Sat|Sun)
8+
Value MONTH (\w+)
9+
Value DAY (\d+)
10+
Value YEAR (\d+)
11+
Value PAC_OPAQUE (\S+)
12+
Value REFRESH_TIMER (\S+)
13+
Value REFRESH_TIMER_STOPPED (Refresh\s+timer\s+stopped)
14+
Value ERROR (No\s+PACs\s+found\s+in\s+the\s+key\s+store\.)
15+
Value SECONDS_WAITING_FOR_SERVER (\d+)
16+
17+
Start
18+
^\s*Load\s+for\s+five\s+secs\s*:
19+
^\s*Time\s+source\s+is\s+
20+
^-+\s+show\s+(?:cts|sga-binos)\s+pacs\s+-+
21+
^${ERROR} -> Record
22+
^\s*AID\s*:\s+${AID}
23+
^\s*PAC-Info\s*:
24+
^\s+PAC-type\s+=\s+${PAC_TYPE}
25+
^\s+AID\s*:
26+
^\s+I-ID\s*:\s+${INITIATOR_ID}
27+
^\s+A-ID-Info\s*:\s+${AUTHENTICATOR_ID_INFO}
28+
^\s+Credential\s+Lifetime\s*:\s+${TIME}\s+${TIMEZONE}(\s+${WEEKDAY})?\s+${MONTH}\s+${DAY}(\s+${YEAR})?
29+
^\s*PAC-Opaque\s*:\s+${PAC_OPAQUE}
30+
^\s*Refresh\s+timer\s+is\s+set\s+for\s+${REFRESH_TIMER}
31+
^\s*${REFRESH_TIMER_STOPPED}\s*,\s+provisioning\s+jobs\s+in\s+session
32+
^\s*$$
33+
^\s*Reqid=\S+\s+\S+
34+
^\s*Refresh\s+delayed\s+for\s+${SECONDS_WAITING_FOR_SERVER}\s+seconds\s+waiting\s+for\s+server\s+address\s+information
35+
^\S+$$
36+
^.* -> Error

ntc_templates/templates/index

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ cisco_ios_show_ip_mroute.textfsm, .*, cisco_ios, sh[[ow]] ip mr[[oute]]
353353
cisco_ios_show_nve_peers.textfsm, .*, cisco_ios, sh[[ow]] nv[[e]] p[[eers]]
354354
cisco_ios_show_route-map.textfsm, .*, cisco_ios, sh[[ow]] route-m[[ap]]
355355
cisco_ios_show_snmp_user.textfsm, .*, cisco_ios, sh[[ow]] sn[[mp]] u[[ser]]
356+
cisco_ios_show_cts_pacs.textfsm, .*, cisco_ios, sh[[ow]] ct[[s]] pa[[cs]]
356357
cisco_ios_show_ip_route.textfsm, .*, cisco_ios, sh[[ow]] ip r[[oute]]
357358
cisco_ios_show_platform.textfsm, .*, cisco_ios, sh[[ow]] plat[[form]]
358359
cisco_ios_show_vrrp_all.textfsm, .*, cisco_ios, sh[[ow]] vrr[[p]] a[[ll]]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
AID: 0123456789ABCDEF0123456789ABCDEF
2+
PAC-Info:
3+
PAC-type = Cisco Trustsec
4+
AID: 0123456789ABCDEF0123456789ABCDEF
5+
I-ID: switch0001
6+
A-ID-Info: Identity Services Engine
7+
Credential Lifetime: 20:42:42 CEST Wed Jun 08 )
8+
b^Lz
9+
PAC-Opaque: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF01234567
10+
Refresh timer is set for 00:00:24
11+
Refresh delayed for 4286610 seconds waiting for server address information.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
parsed_sample:
3+
- aid: "0123456789ABCDEF0123456789ABCDEF"
4+
authenticator_id_info: "Identity Services Engine"
5+
day: "08"
6+
error: ""
7+
initiator_id: "switch0001"
8+
month: "Jun"
9+
pac_opaque: "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF01234567"
10+
pac_type: "Cisco Trustsec"
11+
refresh_timer: "00:00:24"
12+
refresh_timer_stopped: ""
13+
seconds_waiting_for_server: "4286610"
14+
time: "20:42:42"
15+
timezone: "CEST"
16+
weekday: "Wed"
17+
year: ""
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
AID: 0123456789ABCDEF0123456789ABCDEF
2+
PAC-Info:
3+
PAC-type = Cisco Trustsec
4+
AID: 0123456789ABCDEF0123456789ABCDEF
5+
I-ID: switch0002
6+
A-ID-Info: Identity Services Engine
7+
Credential Lifetime: 09:52:42 CEST Oct 04 2025
8+
PAC-Opaque: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF01234567
9+
Refresh timer is set for 6w6d
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
parsed_sample:
3+
- aid: "0123456789ABCDEF0123456789ABCDEF"
4+
authenticator_id_info: "Identity Services Engine"
5+
day: "04"
6+
error: ""
7+
initiator_id: "switch0002"
8+
month: "Oct"
9+
pac_opaque: "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF01234567"
10+
pac_type: "Cisco Trustsec"
11+
refresh_timer: "6w6d"
12+
refresh_timer_stopped: ""
13+
seconds_waiting_for_server: ""
14+
time: "09:52:42"
15+
timezone: "CEST"
16+
weekday: ""
17+
year: "2025"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
AID: 0123456789ABCDEF0123456789ABCDEF
2+
PAC-Info:
3+
PAC-type = Cisco Trustsec
4+
AID: 0123456789ABCDEF0123456789ABCDEF
5+
I-ID: switch0001
6+
A-ID-Info: Identity Services Engine
7+
Credential Lifetime: 09:52:42 UTC Sat Oct 04 2025
8+
PAC-Opaque: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF01234567
9+
Refresh timer is set for 6w6d
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
parsed_sample:
3+
- aid: "0123456789ABCDEF0123456789ABCDEF"
4+
authenticator_id_info: "Identity Services Engine"
5+
day: "04"
6+
error: ""
7+
initiator_id: "switch0001"
8+
month: "Oct"
9+
pac_opaque: "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF01234567"
10+
pac_type: "Cisco Trustsec"
11+
refresh_timer: "6w6d"
12+
refresh_timer_stopped: ""
13+
seconds_waiting_for_server: ""
14+
time: "09:52:42"
15+
timezone: "UTC"
16+
weekday: "Sat"
17+
year: "2025"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
No PACs found in the key store.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
parsed_sample:
3+
- aid: ""
4+
authenticator_id_info: ""
5+
day: ""
6+
error: "No PACs found in the key store."
7+
initiator_id: ""
8+
month: ""
9+
pac_opaque: ""
10+
pac_type: ""
11+
refresh_timer: ""
12+
refresh_timer_stopped: ""
13+
seconds_waiting_for_server: ""
14+
time: ""
15+
timezone: ""
16+
weekday: ""
17+
year: ""

0 commit comments

Comments
 (0)