Debian Codegraph @

ntc_templates/templates/cisco_asa_show_running-config_all_crypto_map.textfsm

raw
1 Value MATCHED_ADDRESS (\S+)
2 Value CONNECTION_TYPE (\S+)
3 Value Required MAP (\S+)
4 Value Required SEQ (\d+)
5 Value PFS (group\d|\s*)
6 Value PEER (\S+)
7 Value IKEv1_PHASE1_MODE (\S+)
8 Value IKEv1_TRANSFORM_SET (\S+(\s\S+)*?)
9 Value IKEv2_MODE (\S+)
10 Value ISAKMP_DYNAMIC (\S+)
11 Value Fillup INTERFACE (\S+)
12 Value TRANSFORM (\S+)
13 Value SA_SEC (\d+)
14 Value SA_KB (\d+)
15 Value TFC_PACKETS (\S\S)
16
17 Start
18 # Value's address , start of block
19 ^crypto\smap\s${MAP}\s${SEQ}\smatch\saddress\s${MATCHED_ADDRESS}\s*$$ -> ReadBlockLines
20 ^. -> Error
21
22 ReadBlockLines
23 #1 Fake start, block "match address" to trigger recording of current block
24 ^crypto\s+map\s\S+\s\d+\s+match\s+address\s\S+\s*$$ -> Continue.Record
25 #1 Real capture of "match address" start of new record
26 ^crypto\smap\s${MAP}\s${SEQ}\smatch\saddress\s${MATCHED_ADDRESS}\s*$$
27 #
28 ^crypto\smap\s${MAP}\s${SEQ}\sset\sconnection-type\s${CONNECTION_TYPE}\s*$$
29 ^crypto\smap\s${MAP}\s${SEQ}\sset\spfs\s${PFS}\s*$$
30 ^crypto\smap\s${MAP}\s${SEQ}\sset\speer\s${PEER}\s*$$
31 ^crypto\smap\s${MAP}\s${SEQ}\sset\sikev1\sphase1-mode\s${IKEv1_PHASE1_MODE}\s*$$
32 ^crypto\smap\s${MAP}\s${SEQ}\sset\sikev1\stransform-set\s${IKEv1_TRANSFORM_SET}\s*$$
33 ^crypto\smap\s${MAP}\s${SEQ}\sset\sikev2\smode\s${IKEv2_MODE}\s*$$
34 # SA Second/Byte alone or in different combinations
35 ^crypto\smap\s\S+\s\d+\sset\ssecurity-association\slifetime\sseconds\s${SA_SEC}\s*$$
36 ^crypto\smap\s\S+\s\d+\sset\ssecurity-association\slifetime\skilobytes\s${SA_KB}\s*$$
37 ^crypto\smap\s\S+\s\d+\sset\ssecurity-association\slifetime\skilobytes\s${SA_KB}\sseconds\s${SA_SEC}\s*$$
38 ^crypto\smap\s\S+\s\d+\sset\ssecurity-association\slifetime\sseconds\s${SA_SEC}\skilobytes\s${SA_KB}\s*$$
39 #2 Fake start, block "match address" to trigger recording of current block
40 ^crypto\s+map\s\S+\s\d+\sipsec-isakmp\sdynamic\s${ISAKMP_DYNAMIC}\s*$$ -> Continue.Record
41 #2 Real capture of "match address" start of new record
42 ^crypto\smap\s${MAP}\s${SEQ}\sipsec-isakmp\sdynamic\s${ISAKMP_DYNAMIC}\s*$$
43 #
44 #3 no crypto map only at end of each block, if unset (add -> Record for safety)
45 ^${TFC_PACKETS}\scrypto\smap\s${MAP}\s${SEQ}\sset\stfc-packets\s*$$ -> Record
46 #4 Interface only after multiple blocks, FillUp
47 ^crypto\smap\s${MAP}\sinterface\s${INTERFACE}\s*$$
48 #
49 ^\s*$$
50 ^. -> Error