Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgill298 committed Jul 17, 2024
1 parent a8b4d6d commit f224341
Show file tree
Hide file tree
Showing 25 changed files with 339 additions and 274 deletions.
2 changes: 1 addition & 1 deletion ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,10 @@ mikrotik_routeros_user_active_print.textfsm, .*, mikrotik_routeros, [[/]]us[[er]
mikrotik_routeros_ip_address_print.textfsm, .*, mikrotik_routeros, [[/]]ip ad[[dress]] p[[rint]]
mikrotik_routeros_ping.textfsm, .*, mikrotik_routeros, [[/]]pin[[g]]

oneaccess_oneos_show_ip_helper-address_statistics.textfsm, .*, oneaccess_oneos, sh[[ow]] ip helper-address statistics
oneaccess_oneos_show_ip_interface_brief.textfsm, .*, oneaccess_oneos, sh[[ow]] ip int[[erface]] brief
oneaccess_oneos_show_ip_bgp_summary.textfsm, .*, oneaccess_oneos, sh[[ow]] ip bgp summary
oneaccess_oneos_show_ip_prefix-list.textfsm, .*, oneaccess_oneos, sh[[ow]] ip prefix-list
oneaccess_oneos_show_ip_vrf_brief.textfsm, .*, oneaccess_oneos, sh[[ow]] ip vrf brief
oneaccess_oneos_show_ip_ssh.textfsm, .*, oneaccess_oneos, sh[[ow]] ip ssh

paloalto_panos_show_running_security-policy.textfsm, .*, paloalto_panos, sh[[ow]] runn[[ing]] security[[-policy]]
Expand Down
23 changes: 12 additions & 11 deletions ntc_templates/templates/oneaccess_oneos_show_ip_bgp_summary.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ Value Filldown PEERS (\d+)
Value Filldown BGP_MEMORY (\d+\s\S+)
Value Filldown AS_PATH_ENTRIES (\d+)
Value Filldown COMMUNTIY_ENTRIES (\d+)
Value BGP_NEIGH (\d+\.\d+\.\d+\.\d+)
Value ADDR_FAMILY (\d+)
Value NEIGH_AS (\d+)
Value MSG_RCVD (\d+)
Value MSG_SENT (\d+)
Value TBL_VER (\d+)
Value IN_Q (\d+)
Value OUT_Q (\d+)
Value BGP_NEIGHBOR (\d+\.\d+\.\d+\.\d+)
Value ADDRESS_FAMILY (\d+)
Value NEIGHBOR_AS (\d+)
Value MESSAGE_RECEIVED (\d+)
Value MESSAGE_SENT (\d+)
Value TABLE_VERSION (\d+)
Value IN_QUEUE (\d+)
Value OUT_QUEUE (\d+)
Value UP_DOWN (\S+?)
Value STATE_PFXRCD (\S+\s+\S+|\S+)
Value STATE_PREFIX_RECEIVED (\S+\s+\S+|\S+)
Value Fillup TOTAL_NEIGHBORS (\d+)

Start
Expand All @@ -25,9 +25,10 @@ Start
^Peers\s${PEERS},\susing\s${BGP_MEMORY}\sof\smemory
^${AS_PATH_ENTRIES}\sBGP\sAS-PATH\sentries
^${COMMUNTIY_ENTRIES}\sBGP\scommunity\sentries
^Neighbor\s
^${BGP_NEIGH}\s+${ADDR_FAMILY}\s+${NEIGH_AS}\s+${MSG_RCVD}\s+${MSG_SENT}\s+${TBL_VER}\s+${IN_Q}\s+${OUT_Q}\s+${UP_DOWN}\s+${STATE_PFXRCD} -> Record
^Neighbor\s+V\s+AS\s+MsgRcvd\s+MsgSent\s+TblVer\s+InQ\s+OutQ\s+Up/Down\s+State/PfxRcd\s*$$
^${BGP_NEIGHBOR}\s+${ADDRESS_FAMILY}\s+${NEIGHBOR_AS}\s+${MESSAGE_RECEIVED}\s+${MESSAGE_SENT}\s+${TABLE_VERSION}\s+${IN_QUEUE}\s+${OUT_QUEUE}\s+${UP_DOWN}\s+${STATE_PREFIX_RECEIVED} -> Record
^Total\snumber\sof\sneighbors\s${TOTAL_NEIGHBORS}
^\s*$$
^. -> Error

EOF

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Value INTF (\S+(?:\s\S+)?)
Value IPADDR (\S+)
Value INTERFACE (\S+(?:\s\S+)?)
Value IP_ADDRESS (\S+)
Value OK (YES|NO|Yes|No|yes|no)
Value STATUS (up|down|administratively down)
Value PROTO (up|down)
Value IFDESCR (.*)
Value PROTOCOL (up|down)
Value DESCRIPTION (.*?)

Start
^${INTF}\s+${IPADDR}\s+${OK}\s+${STATUS}\s+${PROTO}\s+${IFDESCR} -> Record
^.*$$
^Interface\s+IP[-\s]Address\s+OK\?\s+Status\s+Protocol\s+Description\s*$$
^${INTERFACE}\s+${IP_ADDRESS}\s+${OK}\s+${STATUS}\s+${PROTOCOL}\s+${DESCRIPTION}\s*$$ -> Record
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
Value Required,Filldown PROTCOL (\S+)
Value Required,Filldown PROTOCOL (\S+)
Value Required,Filldown NAME (\S+)
Value Filldown DESCRIPTION (.*)
Value Required SEQ (\d+)
Value Required SEQUENCE (\d+)
Value ACTION (\S+)
Value NETWORK ([0-9a-f:\.]+|any)
Value NETMASK (\d+)
Value LE (\d+)
Value GE (\d+)

Start
^${PROTCOL}:\sip\s+prefix-list\s+${NAME}
^${PROTOCOL}:\sip\s+prefix-list\s+${NAME}
^\s+Description:\s${DESCRIPTION}
^\s+seq\s+${SEQ}\s+${ACTION}\s+${NETWORK}(/${NETMASK}|)(?:\s+ge\s+${GE}|)(?:\s+le\s+${LE}|)\s*$$ -> Record
^\s+seq\s+${SEQUENCE}\s+${ACTION}\s+${NETWORK}(/${NETMASK}|)(?:\s+ge\s+${GE}|)(?:\s+le\s+${LE}|)\s*$$ -> Record
^\s*$$
^.+ -> Error

13 changes: 8 additions & 5 deletions ntc_templates/templates/oneaccess_oneos_show_ip_ssh.textfsm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Value SSH (\S+)
Value SCP (\S+)
Value ENCR (ssh\-\S+|\S+)
Value ENCRYPTION (ssh\-\S+|\S+)
Value BITS (\d+)
Value FINGERPRINT ([a-f0-9:]+)
Value MAX_SESSIONS (\d+)
Expand All @@ -18,11 +18,14 @@ Start
^Session\stimeout\s${SESSION_TIMEOUT}\ssecs
^Maximum\snumber\sof\ssessions\s${MAX_SESSIONS}
^Maximum\snumber\sof\schannels\sper\ssession\s${MAX_CHANNELS_SESSION}
^Authorized\s+public\s+keys:
^none
^Key\sfingerprint -> FINGERPRINT
^.*$$
^\s*$$
^. -> Error

FINGERPRINT
^${ENCR}\s${BITS}\s${FINGERPRINT}\s*$$ -> Start
^${BITS}\sMD5:${FINGERPRINT}.*\s\(${ENCR}\)$$ -> Start

^${ENCRYPTION}\s${BITS}\s${FINGERPRINT}\s*$$ -> Start
^${BITS}\sMD5:${FINGERPRINT}.*\s\(${ENCRYPTION}\)$$ -> Start
^\s*$$
^. -> Error
12 changes: 12 additions & 0 deletions ntc_templates/templates/oneaccess_oneos_show_ip_vrf_brief.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Value VRF (\w+)
Value VRF_ID (\d+)
Value List INTERFACES ([\w\-]+\s?[\w\/\.]+)

Start
^\s*VRF\s+Name\s+VRF\s+I[Dd]\s+Interfaces\s*$$
^\s?\w+\s+\d+ -> Continue.Record
^\s?${VRF}?\s+${VRF_ID}\s+${INTERFACES}$$
^\s?${VRF}?\s+${VRF_ID}\s*$$
^\s+${INTERFACES}$$
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ BGP router identifier 194.5.12.148, local AS number 65000, vrf (null)
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
194.5.163.29 4 14737 13360 12237 34 0 0 4d05h57m 28

Total number of neighbors 1
Total number of neighbors 1
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ parsed_sample:
bgp_memory: ""
as_path_entries: "6"
communtiy_entries: "0"
bgp_neigh: "194.5.163.29"
addr_family: "4"
neigh_as: "14737"
msg_rcvd: "13360"
msg_sent: "12237"
tbl_ver: "34"
in_q: "0"
out_q: "0"
bgp_neighbor: "194.5.163.29"
address_family: "4"
neighbor_as: "14737"
message_received: "13360"
message_sent: "12237"
table_version: "34"
in_queue: "0"
out_queue: "0"
up_down: "4d05h57m"
state_pfxrcd: "28"
state_prefix_received: "28"
total_neighbors: "1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.4.21.254 4 61400 38962 26256 78123 0 0 20:35:48 881
192.4.91.254 4 61400 38876 26260 78123 0 0 20:35:48 881

Total number of neighbors 2
Total number of neighbors 2
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ parsed_sample:
bgp_memory: "5128 bytes"
as_path_entries: ""
communtiy_entries: ""
bgp_neigh: "192.4.21.254"
addr_family: "4"
neigh_as: "61400"
msg_rcvd: "38962"
msg_sent: "26256"
tbl_ver: "78123"
in_q: "0"
out_q: "0"
bgp_neighbor: "192.4.21.254"
address_family: "4"
neighbor_as: "61400"
message_received: "38962"
message_sent: "26256"
table_version: "78123"
in_queue: "0"
out_queue: "0"
up_down: "20:35:48"
state_pfxrcd: "881"
state_prefix_received: "881"
total_neighbors: "2"
- router_id: "1.105.35.17"
local_as: "65000"
Expand All @@ -29,14 +29,14 @@ parsed_sample:
bgp_memory: "5128 bytes"
as_path_entries: ""
communtiy_entries: ""
bgp_neigh: "192.4.91.254"
addr_family: "4"
neigh_as: "61400"
msg_rcvd: "38876"
msg_sent: "26260"
tbl_ver: "78123"
in_q: "0"
out_q: "0"
bgp_neighbor: "192.4.91.254"
address_family: "4"
neighbor_as: "61400"
message_received: "38876"
message_sent: "26260"
table_version: "78123"
in_queue: "0"
out_queue: "0"
up_down: "20:35:48"
state_pfxrcd: "881"
state_prefix_received: "881"
total_neighbors: "2"
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Bvi 200 94.105.16.129 YES up down *IPE
dot11radio 0/0.1 <unassigned> YES up up
dot11radio 0/0.2 <unassigned> YES up up
Null 0 <unassigned> YES up up
dot11radio 0/0 <unassigned> YES up up
dot11radio 0/0 <unassigned> YES up up
Loading

0 comments on commit f224341

Please sign in to comment.