diff --git a/ntc_templates/templates/fsas_sir_show_ip_ospf_neighbor.textfsm b/ntc_templates/templates/fsas_sir_show_ip_ospf_neighbor.textfsm new file mode 100644 index 0000000000..46d8341c8b --- /dev/null +++ b/ntc_templates/templates/fsas_sir_show_ip_ospf_neighbor.textfsm @@ -0,0 +1,19 @@ +Value Filldown,Required INTERFACE (\S+) +Value NEIGHBOR_ID (\S+) +Value PRIORITY (\d+) +Value STATE (\S+) +Value DEAD_TIME (\S+) +Value IP_ADDRESS (\S+) +Value DATABASE_SUMMARY_LIST (\d+) +Value LINK_STATE_REQUEST_LIST (\d+) +Value LINK_STATE_RETRANSMISSION_LIST (\d+) + +Start + ^Neighbor\s+information\s+with + ^Neighbor\s+with\s+${INTERFACE}\s+result:\s*$$ + ^\s+Neighbor\s+ID\s+Pri\s+State + ^\s+${NEIGHBOR_ID}\s+${PRIORITY}\s+${STATE}\s+${DEAD_TIME}\s+${IP_ADDRESS}\s+${DATABASE_SUMMARY_LIST}\s+${LINK_STATE_REQUEST_LIST}\s+${LINK_STATE_RETRANSMISSION_LIST}\s*$$ -> Record + ^\s*$$ + ^. -> Error + +EOF diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index d2c8901a21..ede0be644c 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -640,6 +640,7 @@ fortinet_execute_ping.textfsm, .*, fortinet, exec[[ute]] ping fortinet_execute_time.textfsm, .*, fortinet, exec[[ute]] ti[[me]] fsas_sir_show_system_information.textfsm, .*, fsas_sir, sh[[ow]] sys[[tem]] i[[nformation]] +fsas_sir_show_ip_ospf_neighbor.textfsm, .*, fsas_sir, sh[[ow]] ip ospf nei[[ghbor]] fsas_sir_show_ip_route.textfsm, .*, fsas_sir, sh[[ow]] ip ro[[ute]] fsas_sir_show_ether.textfsm, .*, fsas_sir, sh[[ow]] eth[[er]] fsas_sir_show_vlan.textfsm, .*, fsas_sir, sh[[ow]] vl[[an]] diff --git a/tests/fsas_sir/show_ip_ospf_neighbor/fsas_sir_show_ip_ospf_neighbor.raw b/tests/fsas_sir/show_ip_ospf_neighbor/fsas_sir_show_ip_ospf_neighbor.raw new file mode 100644 index 0000000000..e2da9ff988 --- /dev/null +++ b/tests/fsas_sir/show_ip_ospf_neighbor/fsas_sir_show_ip_ospf_neighbor.raw @@ -0,0 +1,11 @@ + +Neighbor information with all interfaces, result: + +Neighbor with lan1 result: + Neighbor ID Pri State Deadtime Address DDL ReqL RtrL + 1.1.1.1 100 Full/BDR 00:00:37 192.168.50.231 0 0 0 + 4.4.4.4 1 Full/Other 00:00:30 192.168.50.234 11 0 10 + +Neighbor with rmt1 result: + Neighbor ID Pri State Deadtime Address DDL ReqL RtrL + 3.3.3.3 1 Full/PtoP 00:00:35 172.21.120.2 0 0 0 diff --git a/tests/fsas_sir/show_ip_ospf_neighbor/fsas_sir_show_ip_ospf_neighbor.yml b/tests/fsas_sir/show_ip_ospf_neighbor/fsas_sir_show_ip_ospf_neighbor.yml new file mode 100644 index 0000000000..9673c9c326 --- /dev/null +++ b/tests/fsas_sir/show_ip_ospf_neighbor/fsas_sir_show_ip_ospf_neighbor.yml @@ -0,0 +1,29 @@ +--- +parsed_sample: + - database_summary_list: "0" + dead_time: "00:00:37" + interface: "lan1" + ip_address: "192.168.50.231" + link_state_request_list: "0" + link_state_retransmission_list: "0" + neighbor_id: "1.1.1.1" + priority: "100" + state: "Full/BDR" + - database_summary_list: "11" + dead_time: "00:00:30" + interface: "lan1" + ip_address: "192.168.50.234" + link_state_request_list: "0" + link_state_retransmission_list: "10" + neighbor_id: "4.4.4.4" + priority: "1" + state: "Full/Other" + - database_summary_list: "0" + dead_time: "00:00:35" + interface: "rmt1" + ip_address: "172.21.120.2" + link_state_request_list: "0" + link_state_retransmission_list: "0" + neighbor_id: "3.3.3.3" + priority: "1" + state: "Full/PtoP"