Skip to content

Commit

Permalink
Merge branch 'master' into extreme
Browse files Browse the repository at this point in the history
  • Loading branch information
PavloSkliarenko authored Nov 6, 2023
2 parents 43a7b07 + 2e6bfd7 commit 238fcce
Show file tree
Hide file tree
Showing 62 changed files with 2,152 additions and 120 deletions.
202 changes: 202 additions & 0 deletions changes_for_4.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Value PORT (\S+)
Value STATUS (up|down|admin\s+down)
Value PROTOCOL (up|down|lowerlayerdown|notpresent)
Value PROTOCOL (up|down|lowerlayerdown|notpresent|unknown)
Value DESCRIP (\S.*?)

Start
Expand Down
12 changes: 6 additions & 6 deletions ntc_templates/templates/arista_eos_show_ip_bgp.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Value LOCAL_PREF (\S+)
Value WEIGHT (\S+)
Value AS_PATH (.*?)
Value ORIGIN ([ie\?])
Value Filldown VRF (\S+)
Value Filldown LOCAL_AS (\d+\.\d+|\d+)
Value Filldown ROUTER_ID (\S+)

Start
# Since using mostly position, play it safe and ensure we see header first
^AS Path Attributes.+ -> Bgp_table

Bgp_table
# Example:
# * 0.0.0.0/0 100.100.10.226 0 350 0 65000 65000 65000 64810 64800 i
^BGP\s+routing\s+table\s+information\s+for\s+VRF\s+${VRF}
^Router\s+identifier\s+${ROUTER_ID},\s+local\s+AS\s+number\s+${LOCAL_AS}
^AS Path Attributes.+
^\s${STATUS}${PATH_SELECTION}${ROUTE_SOURCE}\s+${NETWORK}\s+${NEXT_HOP}\s+${METRIC}\s+${LOCAL_PREF}\s+${WEIGHT}\s+${AS_PATH}\s+${ORIGIN}$$ -> Record

EOF
7 changes: 3 additions & 4 deletions ntc_templates/templates/arista_eos_show_ip_bgp_detail.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ Value COMMUNITY ((?:(?:(?:no-export|no-advertise|local-as|internet)|\d+\s?:\s?\d
Value NEXT_HOP (\d+\.\d+\.\d+\.\d+)
Value NEIGHBOR (\S+)
Value NEIGHBOR_ID (\S+)
Value Filldown VRF (\S+)
Value Filldown ROUTER_ID (\S+)
Value Filldown LOCAL_AS (\S+)
Value METRIC (\d+)

Start
^BGP\s+routing\s+table\sinformation.+
^Router\s+identifier\s+${ROUTER_ID},\s+local\s+AS\s+number\s+${LOCAL_AS} -> Path

Path
^BGP\s+routing\s+table\sinformation\s+for\s+VRF\s+${VRF}
^Router\s+identifier\s+${ROUTER_ID},\s+local\s+AS\s+number\s+${LOCAL_AS}
^BGP\s+routing\s+table\s+entry\s+for\s+${PREFIX}(?:/${PREFIX_LENGTH})?
^\s+Paths:\s+\d+\s+available
^\s+${AS_PATH}\s*$$
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Value Filldown,Required SESSION_TYPE (\S+)
Value USERNAME (\S+)
Value Required INDEX (\d+)
Value ASSIGNED_IP (\d+\.\d+\.\d+\.\d+)
Value PUBLIC_IP (\S+)
Value ASSIGNED_IPV6 (\S+)
Value PROTOCOL (.+?)
Value LICENSE (.+?)
Value ENCRYPTION (.+?)
Value HASHING (.+?)
Value BYTES_TX (\d+)
Value BYTES_RX (\d+)
Value GROUP_POLICY (\S+)
Value TUNNEL_GROUP (\S+)
Value LOGIN_TIME (\d+:\d+:\d+)
Value LOGIN_TIME_ZONE (\S+)
Value LOGIN_WEEKDAY (\w+)
Value LOGIN_MONTH (\w+)
Value LOGIN_DAY (\d+)
Value LOGIN_YEAR (\d+)
Value DURATION (.+?)
Value INACTIVITY (.+?)
Value VLAN_MAPPING (\S+)
Value VLAN_ID (.+?)
Value AUDT_SESS_ID (.+?)
Value SECURITY_GRP (\S+)
Value TUNNEL_ZONE (\d+)

Start
^Session\s+Type:\s+${SESSION_TYPE}$$ -> Connection

Connection
^\s*Username\s*:\s+${USERNAME}\s+Index\s+:\s*${INDEX}$$
^\s*Username\s*:\s+${USERNAME}$$
^\s*Index\s*:\s+${INDEX}$$
^\s*Assigned\s+IP\s*:\s+${ASSIGNED_IP}\s+Public\s*IP\s*:\s*${PUBLIC_IP}$$
^\s*Assigned\s+IP\s*:\s+${ASSIGNED_IP}$$
^\s*Assigned\s+IPv6\s*:\s+${ASSIGNED_IPV6}$$
^\s*Public\s+IP\s*:\s+${PUBLIC_IP}$$
^\s*Protocol\s+:\s+${PROTOCOL}$$
^\s*License\s+:\s*${LICENSE}$$
^\s*Encryption\s+:\s*${ENCRYPTION}$$
^\s*Hashing\s+:\s*${HASHING}$$
^\s*Bytes\s+Tx\s+:\s+${BYTES_TX}\s+Bytes\s+Rx\s+:\s+${BYTES_RX}$$
^\s*Group\s+Policy\s+:\s+${GROUP_POLICY}\s+Tunnel\s+Group\s+:\s+${TUNNEL_GROUP}$$
^\s*Group\s+Policy\s+:\s+${GROUP_POLICY}$$
^\s*Tunnel\s+Group\s+:\s+${TUNNEL_GROUP}$$
^\s*Login\s+Time\s+:\s+${LOGIN_TIME}\s+${LOGIN_TIME_ZONE}\s+${LOGIN_WEEKDAY}\s+${LOGIN_MONTH}\s+${LOGIN_DAY}\s+${LOGIN_YEAR}$$
^\s*Duration\s+:\s+${DURATION}$$
^\s*Inactivity\s+:\s+${INACTIVITY}$$
^\s*VLAN\s+Mapping\s+:\s+${VLAN_MAPPING}\s+VLAN\s+:\s+${VLAN_ID}$$
^\s*Audt\s+Sess\s+ID\s+:\s+${AUDT_SESS_ID}$$
^\s*Security\s+Grp\s+:\s+${SECURITY_GRP}\s+Tunnel\s+Zone\s+:\s+${TUNNEL_ZONE}$$ -> Record
^\s*$$
^. -> Error
13 changes: 13 additions & 0 deletions ntc_templates/templates/cisco_ios_show_ap_cdp_neighbors.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Value AP_NAME (\S+)
Value AP_IP ([a-fA-F0-9:\.]+)
Value NEIGHBOR_NAME (\S+)
Value NEIGHBOR_IP ([a-fA-F0-9:\.]+)
Value NEIGHBOR_PORT ([a-zA-Z0-9\/\.]+)

Start
^[a-zA-Z]+\s[a-z]+\s[a-zA-z]+:\s\d+$$
^AP\sName\s+AP\sIP\s+Neighbor\sName\s+Neighbor\sIP\s+Neighbor\sPort\s*$$
^-+\s*$$
^${AP_NAME}\s+${AP_IP}\s+${NEIGHBOR_NAME}\s+${NEIGHBOR_IP}\s+${NEIGHBOR_PORT}\s*$$ -> Record
^\s*$$
^. -> Error
4 changes: 2 additions & 2 deletions ntc_templates/templates/cisco_ios_show_ip_interface.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Start
^\s+Security
^\s+Split
^\s+ICMP
^\s+IP\s+(?:fast|Flow|CEF|Null|multicast|route|output|access)
^\s+IP\s+(?:fast|Flow|CEF|Null|multicast|route|output|access|Clear)
^\s+Downstream
^\s+Associated
^\s+Topology
Expand All @@ -69,4 +69,4 @@ Start
HELPERS
^\s+${IP_HELPER}\s*$$
^\s+Directed -> Start
^.* -> Error
^.* -> Error
100 changes: 50 additions & 50 deletions ntc_templates/templates/cisco_ios_show_logging.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -10,90 +10,90 @@ Value List MESSAGE (.+)

Start
^Log\s+Buffer
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
# 022701: Jun 19 03:02:31: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet2/0/3, changed state to down
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
# 000024: Dec 2 12:09:21.207: CEF-HWIDB: EDSP0 LES switching vector set to Null
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> DateLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> DateLogs
# Jan 30 14:11:11.354: %ILPOWER-7-DETECT: Interface Gi4/3: Power Device detected: IEEE PD
^${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> DateLogs
^${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> DateLogs
^${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> DateLogs
# 7:04: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet2/0/3, changed state to up
^${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
^${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
^(\*)?${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
^(\*)?${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs


NumberLogs
^(\d{6}):\s+(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^\d{1,2}:\d{1,2}: -> Continue.Record
^(\*)?(\d{6}):\s+(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^(\*)?(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^(\*)?\d{1,2}:\d{1,2}: -> Continue.Record
# NUMBER LOGS
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$
# NUMBER LOGS NO SEVERITY
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$
# DATE LOGS
^${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^${MONTH}\s+${DAY}\s+${TIME}:\s%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}:\s%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
# DATE LOGS NO SEVERITY
^${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^${MONTH}\s+${DAY}\s+${TIME}:\s${FACILITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}:\s${FACILITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
# TIME LOGS
^${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
^(\*)?${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
# TIME LOGS NO SEVERITY
^${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
^(\*)?${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
^${MESSAGE}$$
^\s*$$
^. -> Error

DateLogs
^(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^(\d{6}):\s+(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^\d{1,2}:\d{1,2}: -> Continue.Record
^(\*)?(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^(\*)?(\d{6}):\s+(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^(\*)?\d{1,2}:\d{1,2}: -> Continue.Record
# DATE LOGS
^${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}
^${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}
^(\*)?${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}
^(\*)?${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}
# DATE LOGS NO SEVERITY
^${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}
^${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}
^(\*)?${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}
^(\*)?${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}
# NUMBER LOGS
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
# NUMBER LOGS NO SEVERITY
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
# TIME LOGS
^${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
^(\*)?${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
# TIME LOGS NO SEVERITY
^${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
^(\*)?${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> TimeLogs
^${MESSAGE}$$
^\s*$$
^. -> Error

TimeLogs
^\d{1,2}:\d{1,2}: -> Continue.Record
^(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^\d+:\s+\S+ -> Continue.Record
^(\*)?\d{1,2}:\d{1,2}: -> Continue.Record
^(\*)?(\D\D\D)\s+(\d{1,2})\s+((\d+:\d+:\d+\.\d+)|(\d+:\d+:\d+)) -> Continue.Record
^(\*)?\d+:\s+\S+ -> Continue.Record
# TIME LOGS
^${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$
^(\*)?${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$
# TIME LOGS NO SEVERITY
^${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$
^(\*)?${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$
# DATE LOGS
^${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
# DATE LOGS NO SEVERITY
^${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
^(\*)?${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE} -> DateLogs
# NUMBER LOGS
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+%${FACILITY}-${SEVERITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
# NUMBER LOGS NO SEVERITY
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}\s+${TIMEZONE}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^(\*)?${NUMBER}:\s+${MONTH}\s+${DAY}\s+${TIME}:\s+${FACILITY}-${MNEMONIC}:\s+${MESSAGE}$$ -> NumberLogs
^${MESSAGE}$$
^\s*$$
^. -> Error
^. -> Error
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Value STATUS ([sxSdh*])
# ? \| multipath
Value PATH_SELECTION ([> |])
# Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Value ROUTE_SOURCE ([ieclarI])
Value Filldown NETWORK ([A-Fa-f0-9:\.]+\/\d+)
Value Filldown PREFIX ([A-Fa-f0-9:\.]+)
Value Filldown PREFIX_LENGTH (\d+)
Value NEXT_HOP ([A-Fa-f0-9:\.]+)
Value METRIC (\d+)
Value LOCAL_PREF (\d+)
Value WEIGHT (\d+)
Value AS_PATH ((\d+|\{\d+)(\.\d+?|\s.*?)*)
# Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup
Value ORIGIN ([ie\?\|&])


Start
^Can't\s+find\s+neighbor
^Peer\s+
^BGP\s+(routing|table)\s
^Status:
Expand All @@ -24,18 +21,17 @@ Start
^. -> Error

Bgp_table
#
# Match first when there is no network, since previous line had it already (compliment and filldown below)
# Older table format, with blank values parsing not reliable. (cisco_nxos_show_ip_bgp.raw)
# Network Next Hop Metric LocPrf Weight Path
# Example: *>e10.10.101.4/30 10.10.2.1 0 64102 i
# Example: *>e 10.10.1.1 0 64101 64002 i
^${STATUS}${PATH_SELECTION}${ROUTE_SOURCE}${NETWORK}(\s{0,12}${NEXT_HOP}\s{4}|\s{20})(\s{2,14}${METRIC}|\s{8})(\s{1,18}${LOCAL_PREF}|\s{8})(\s{1,22}${WEIGHT})(\s${AS_PATH})?\s${ORIGIN}$$ -> Record
^${STATUS}${PATH_SELECTION}${ROUTE_SOURCE}${PREFIX}/${PREFIX_LENGTH}(\s{0,12}${NEXT_HOP}\s{4}|\s{20})(\s{2,14}${METRIC}|\s{8})(\s{1,18}${LOCAL_PREF}|\s{8})(\s{1,22}${WEIGHT})(\s${AS_PATH})?\s${ORIGIN}$$ -> Record
^${STATUS}${PATH_SELECTION}${ROUTE_SOURCE}\s\s\s{16}(\s{0,12}${NEXT_HOP}\s{4}|\s{20})(\s{2,14}${METRIC}|\s{8})(\s{1,18}${LOCAL_PREF}|\s{8})(\s{1,22}${WEIGHT})(\s${AS_PATH})?\s${ORIGIN}$$ -> Record
#
# Match newer format (cisco_nxos_show_ip_bgp1.raw)
# Example: * e0.0.0.0/0 1.2.3.4 4294967295 0 12345.102
^${STATUS}${PATH_SELECTION}${ROUTE_SOURCE}${NETWORK}\s${NEXT_HOP}\s${METRIC}\s${LOCAL_PREF}\s${WEIGHT}(\s${AS_PATH})?\s${ORIGIN}$$ -> Record
^${STATUS}${PATH_SELECTION}${ROUTE_SOURCE}${PREFIX}/${PREFIX_LENGTH}\s${NEXT_HOP}\s${METRIC}\s${LOCAL_PREF}\s${WEIGHT}(\s${AS_PATH})?\s${ORIGIN}$$ -> Record
^${STATUS}${PATH_SELECTION}${ROUTE_SOURCE}\s${NEXT_HOP}\s${METRIC}\s${LOCAL_PREF}\s${WEIGHT}(\s${AS_PATH})?\s${ORIGIN}$$ -> Record
^. -> Error

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Value NEIGHBOR (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value PEER_GROUP (\S+)
Value DESCRIPTION (.*)
Value VRF (\S+)
Value ASN (\d+|\d+\.\d+)
Value REMOTE_ASN (\d+|\d+\.\d+)
Value LOCAL_ASN (\d+|\d+\.\d+)
Expand Down Expand Up @@ -62,6 +63,7 @@ Start
^\s+Inherits.+\s${PEER_GROUP}
^\s+Description:\s+${DESCRIPTION}
^\s+BGP state = ${BGP_STATE}, \w+ for ${UPTIME}
^\s+Neighbor\s+vrf:\s+${VRF}
^\s+Using ${SOURCE_IFACE} as [\w\s]+
^\s+[\w\s]+, interface ${SOURCE_IFACE}
^\s+Connections established ${CONN_ESTAB}, dropped ${CONN_DROPPED}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Value Required,Filldown BUNDLE_IFACE (Po\d+)
Value Filldown BUNDLE_STATUS (\(\w+\))
Value Filldown BUNDLE_PROTO (\w+)
Value Filldown BUNDLE_PROTO_STATE (\(\w+\))
Value List PHYS_IFACE (Et.+?)
Value List PHYS_IFACE ([\w\/]+|\-\-)
Value List PHYS_IFACE_STATUS (\(.+?\))


Expand Down Expand Up @@ -43,3 +43,4 @@ CASE2_RTE
^\s{37}Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{37}Et.+?\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\s{37}Et.+?\s+Et.+?\s+Et.+?\s+${PHYS_IFACE}${PHYS_IFACE_STATUS}(\s|$$) -> Continue
^\d+\s+${BUNDLE_IFACE}${BUNDLE_STATUS}\s+\w+\s+${BUNDLE_PROTO}\s+${PHYS_IFACE}($$) -> Next
6 changes: 6 additions & 0 deletions ntc_templates/templates/cisco_s300_show_system_id.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Value SERIAL_NUMBER (\S+)

Start
^\s*Serial\s+number\s*:\s*${SERIAL_NUMBER}\s*$$ -> Record
^\s*$$
^. -> Error
32 changes: 32 additions & 0 deletions ntc_templates/templates/hp_comware_display_interface_brief.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Value INTERFACE (\S+)
Value LINK (\S+)
Value PROTOCOL ((?:UP|DOWN)(?:\(s\))?)
Value MAIN_IP (\S+)
Value SPEED (\S+)
Value DUPLEX (A|H|F)
Value TYPE (A|T|H)
Value PVID (\d+)
Value DESCRIPTION (.*?)

Start
^\s*The\s+brief\s+information\s+of\s+interface\(s\)\s+under\s+route\s+mode:\s*$$
^\s*Link:\s+ADM\s+-\s+administratively\s+down;\s+Stby\s+-\s+standby\s*$$
^\s*Protocol:\s+\(s\)\s+-\s+spoofing\s*$$
^\s*Interface\s+Link\s+Protocol\s+Main\s+IP\s+Description\s*$$ -> RouteModeIfaces
^\s*The\s+brief\s+information\s+of\s+interface\(s\)\s+under\s+bridge\s+mode:\s*$$
^\s*Link:\s+ADM\s+-\s+administratively\s+down;\s+Stby\s+-\s+standby\s*$$
^\s*Speed\s+or\s+Duplex:\s+\(a\)/A\s+-\s+auto;\s+H\s+-\s+half;\s+F\s+-\s+full\s*$$
^\s*Type:\s+A\s+-\s+access;\s+T\s+-\s+trunk;\s+H\s+-\s+hybrid\s*$$
^\s*Interface\s+Link\s+Speed\s+Duplex\s+Type\s+PVID\s+Description\s*$$ -> BridgeModeIfaces
^\s*$$
^. -> Error

RouteModeIfaces
^\s*${INTERFACE}\s+${LINK}\s+${PROTOCOL}\s+${MAIN_IP}(?:\s+${DESCRIPTION})?\s*$$ -> Record
^\s*$$ -> Start
^. -> Error

BridgeModeIfaces
^${INTERFACE}\s+${LINK}\s+${SPEED}\s+${DUPLEX}\s+${TYPE}\s+${PVID}(?:\s+${DESCRIPTION})?\s*$$ -> Record
^\s*$$
^. -> Error
Loading

0 comments on commit 238fcce

Please sign in to comment.