diff --git a/ntc_templates/templates/alcatel_sros_show_port_description.textfsm b/ntc_templates/templates/alcatel_sros_show_port_description.textfsm new file mode 100644 index 0000000000..130c972186 --- /dev/null +++ b/ntc_templates/templates/alcatel_sros_show_port_description.textfsm @@ -0,0 +1,11 @@ +Value PORT_ID (\S+) +Value DESCRIPTION (.+) + +Start + ^=+\s*$$ + ^\s*$$ + ^Port\s+Descriptions\s+on\s+Slot\s+\S+\s*$$ + ^Port\s+Id\s+Description\s*$$ + ^${PORT_ID}\s+${DESCRIPTION}\s*$$ -> Record + ^-+\s*$$ + ^. -> Error \ No newline at end of file diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index b187454b4e..620c7308fc 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -30,6 +30,7 @@ alcatel_sros_show_router_pim_interface.textfsm, .*, alcatel_sros, sh[[ow]] route alcatel_sros_show_service_id_interface.textfsm, .*, alcatel_sros, sh[[ow]] se[[rvice]] id (\d+ in[[terface]]|in[[terface]]) alcatel_sros_show_service_sap-using.textfsm, .*, alcatel_sros, sh[[ow]] service sap-u[[sing]] alcatel_sros_show_service_sdp-using.textfsm, .*, alcatel_sros, sh[[ow]] service sdp-using +alcatel_sros_show_port_description.textfsm, .*, alcatel_sros, sh[[ow]] port (\S+ )?des[[cription]] alcatel_sros_show_router_interface.textfsm, .*, alcatel_sros, sh[[ow]] router (\d+ int[[erface]]|int[[erface]]) alcatel_sros_show_router_mpls_lsp.textfsm, .*, alcatel_sros, sh[[ow]] router mpls lsp alcatel_sros_show_service_id_base.textfsm, .*, alcatel_sros, sh[[ow]] serv[[ice]] id ba[[se]] diff --git a/tests/alcatel_sros/show_port_description/show_port_description.raw b/tests/alcatel_sros/show_port_description/show_port_description.raw new file mode 100644 index 0000000000..82af15439a --- /dev/null +++ b/tests/alcatel_sros/show_port_description/show_port_description.raw @@ -0,0 +1,35 @@ +=============================================================================== +Port Descriptions on Slot 1 +=============================================================================== +Port Id Description +------------------------------------------------------------------------------- +1/1/1 some_gig1_test +1/1/2 some2_gig1_test +1/1/3 some3_gig1_test +1/1/4 some4_gig1_test +1/1/5 some5_gig1_test +1/1/6 10/100/Gig Ethernet SFP +1/1/7 10/100/Gig Ethernet SFP +1/1/8 10/100/Gig Ethernet SFP +1/1/9 10/100/Gig Ethernet SFP +1/1/10 10/100/Gig Ethernet SFP +1/1/11 10/100/Gig Ethernet SFP +1/1/12 TEST_AGG_TOGGLE +1/1/13 TNET_RAN_TEST1 +1/1/14 TNET_RAN_TEST2 +1/1/15 test 1 +1/1/16 test 2 +1/1/17 TEST_3 +1/1/18 TNET_RAN_TEST3 +1/1/19 TNET_RAN_TEST4 +1/1/20 TNET_RAN_TEST5 +1/5/1 10-Gig Ethernet +1/5/2 10-Gig Ethernet + +=============================================================================== +Port Descriptions on Slot A +=============================================================================== +Port Id Description +------------------------------------------------------------------------------- +A/1 10/100 Ethernet TX +=============================================================================== diff --git a/tests/alcatel_sros/show_port_description/show_port_description.yml b/tests/alcatel_sros/show_port_description/show_port_description.yml new file mode 100644 index 0000000000..e3445f2350 --- /dev/null +++ b/tests/alcatel_sros/show_port_description/show_port_description.yml @@ -0,0 +1,48 @@ +--- +parsed_sample: + - description: "some_gig1_test" + port_id: "1/1/1" + - description: "some2_gig1_test" + port_id: "1/1/2" + - description: "some3_gig1_test" + port_id: "1/1/3" + - description: "some4_gig1_test" + port_id: "1/1/4" + - description: "some5_gig1_test" + port_id: "1/1/5" + - description: "10/100/Gig Ethernet SFP" + port_id: "1/1/6" + - description: "10/100/Gig Ethernet SFP" + port_id: "1/1/7" + - description: "10/100/Gig Ethernet SFP" + port_id: "1/1/8" + - description: "10/100/Gig Ethernet SFP" + port_id: "1/1/9" + - description: "10/100/Gig Ethernet SFP" + port_id: "1/1/10" + - description: "10/100/Gig Ethernet SFP" + port_id: "1/1/11" + - description: "TEST_AGG_TOGGLE" + port_id: "1/1/12" + - description: "TNET_RAN_TEST1" + port_id: "1/1/13" + - description: "TNET_RAN_TEST2" + port_id: "1/1/14" + - description: "test 1" + port_id: "1/1/15" + - description: "test 2" + port_id: "1/1/16" + - description: "TEST_3" + port_id: "1/1/17" + - description: "TNET_RAN_TEST3" + port_id: "1/1/18" + - description: "TNET_RAN_TEST4" + port_id: "1/1/19" + - description: "TNET_RAN_TEST5" + port_id: "1/1/20" + - description: "10-Gig Ethernet" + port_id: "1/5/1" + - description: "10-Gig Ethernet" + port_id: "1/5/2" + - description: "10/100 Ethernet TX" + port_id: "A/1"