diff --git a/ntc_templates/templates/alcatel_sros_show_router_ospf_interface.textfsm b/ntc_templates/templates/alcatel_sros_show_router_ospf_interface.textfsm new file mode 100644 index 0000000000..6f790aad56 --- /dev/null +++ b/ntc_templates/templates/alcatel_sros_show_router_ospf_interface.textfsm @@ -0,0 +1,27 @@ +Value Required INTERFACE (\S+) +Value Required AREA (\S+) +Value Required DESIG_RTR (\S+) +Value Required BKUP_DESIG_RTR (\S+) +Value Required ADMIN_STATE (\S+) +Value Required OPER_STATE (\S+) + +Start + ^=+ + ^Rtr\s+Base + ^If\s+Name\s+Area\s+Id\s+Designated\s+Rtr\s+Bkup\s+Desig\s+Rtr\s+Adm\s+Oper\s*$$ + ^-+ -> Interface + ^\s*$$ + ^. -> Error + +Interface + ^${INTERFACE}\s+${AREA}\s+${DESIG_RTR}\s+${BKUP_DESIG_RTR}\s+${ADMIN_STATE}\s+${OPER_STATE} -> Record + ^-+ -> Total + ^\s*$$ + ^. -> Error + +Total + ^No.\s+ + ^=+ -> Done + ^. -> Error + +Done diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index e33bb43f98..fc3db637ca 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -18,6 +18,7 @@ alcatel_sros_show_router_bgp_summary_family.textfsm, .*, alcatel_sros, sh[[ow]] alcatel_sros_show_router_isis_adjacency.textfsm, .*, alcatel_sros, sh[[ow]] router isis adj[[acency]] alcatel_sros_show_router_isis_interface.textfsm, .*, alcatel_sros, sh[[ow]] router isis int[[erface]] alcatel_sros_show_router_mpls_interface.textfsm, .*, alcatel_sros, sh[[ow]] router mpls int[[erface]] +alcatel_sros_show_router_ospf_interface.textfsm, .*, alcatel_sros, sh[[ow]] router ospf int[[erface]] alcatel_sros_show_router_rsvp_interface.textfsm, .*, alcatel_sros, sh[[ow]] router rsvp int[[erface]] alcatel_sros_show_router_ldp_interface.textfsm, .*, alcatel_sros, sh[[ow]] router ldp int[[erface]] alcatel_sros_show_router_pim_interface.textfsm, .*, alcatel_sros, sh[[ow]] router pim int[[erface]] diff --git a/tests/alcatel_sros/show_router_ospf_interface/alcatel_sros_show_router_ospf_interface.raw b/tests/alcatel_sros/show_router_ospf_interface/alcatel_sros_show_router_ospf_interface.raw new file mode 100644 index 0000000000..a901f8e05b --- /dev/null +++ b/tests/alcatel_sros/show_router_ospf_interface/alcatel_sros_show_router_ospf_interface.raw @@ -0,0 +1,12 @@ +=============================================================================== +Rtr Base OSPFv2 Instance 0 Interfaces +=============================================================================== +If Name Area Id Designated Rtr Bkup Desig Rtr Adm Oper +------------------------------------------------------------------------------- +system 0.0.0.0 10.10.10.3 0.0.0.0 Up DR +TO_IOSXR 0.0.0.0 0.0.0.0 0.0.0.0 Up PToP +TO_R1 0.0.0.0 0.0.0.0 0.0.0.0 Up PToP +TO_R4 0.0.0.0 0.0.0.0 0.0.0.0 Up PToP +------------------------------------------------------------------------------- +No. of OSPF Interfaces: 4 +=============================================================================== diff --git a/tests/alcatel_sros/show_router_ospf_interface/alcatel_sros_show_router_ospf_interface.yml b/tests/alcatel_sros/show_router_ospf_interface/alcatel_sros_show_router_ospf_interface.yml new file mode 100644 index 0000000000..5c1c77d79c --- /dev/null +++ b/tests/alcatel_sros/show_router_ospf_interface/alcatel_sros_show_router_ospf_interface.yml @@ -0,0 +1,26 @@ +--- +parsed_sample: + - interface: "system" + area: "0.0.0.0" + desig_rtr: "10.10.10.3" + bkup_desig_rtr: "0.0.0.0" + admin_state: "Up" + oper_state: "DR" + - interface: "TO_IOSXR" + area: "0.0.0.0" + desig_rtr: "0.0.0.0" + bkup_desig_rtr: "0.0.0.0" + admin_state: "Up" + oper_state: "PToP" + - interface: "TO_R1" + area: "0.0.0.0" + desig_rtr: "0.0.0.0" + bkup_desig_rtr: "0.0.0.0" + admin_state: "Up" + oper_state: "PToP" + - interface: "TO_R4" + area: "0.0.0.0" + desig_rtr: "0.0.0.0" + bkup_desig_rtr: "0.0.0.0" + admin_state: "Up" + oper_state: "PToP"