diff --git a/ntc_templates/templates/alcatel_sros_show_service_service-using.textfsm b/ntc_templates/templates/alcatel_sros_show_service_service-using.textfsm new file mode 100644 index 0000000000..6d6d5e81bb --- /dev/null +++ b/ntc_templates/templates/alcatel_sros_show_service_service-using.textfsm @@ -0,0 +1,15 @@ +Value SERVICE_ID (\d+) +Value TYPE (\S+) +Value ADMIN_STATUS (\S+) +Value OPERATIONAL_STATUS (\S+) +Value CUSTOMER_ID (\d+) +Value SERVICE_NAME (\S+) + +Start + ^=+\s*$$ + ^Services.*$$ + ^ServiceId\s+Type\s+Adm\s+Opr\s+CustomerId\s+Service\s+Name + ^\s*${SERVICE_ID}\s+${TYPE}\s+${ADMIN_STATUS}\s+${OPERATIONAL_STATUS}\s+${CUSTOMER_ID}\s+${SERVICE_NAME}\s*$$ -> Record + ^Matching\s+Services\s+:\s+\d+\s*$$ + ^-+\s*$$ + ^. -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 620c7308fc..d90d9ffe0b 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -25,6 +25,7 @@ alcatel_sros_show_router_isis_interface.textfsm, .*, alcatel_sros, sh[[ow]] rout 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_service_service-using.textfsm, .*, alcatel_sros, sh[[ow]] se[[rvice]] service-u[[sing]] 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]] alcatel_sros_show_service_id_interface.textfsm, .*, alcatel_sros, sh[[ow]] se[[rvice]] id (\d+ in[[terface]]|in[[terface]]) diff --git a/tests/alcatel_sros/show_service_service-using/show_service_service-using.raw b/tests/alcatel_sros/show_service_service-using/show_service_service-using.raw new file mode 100644 index 0000000000..95ba90cd38 --- /dev/null +++ b/tests/alcatel_sros/show_service_service-using/show_service_service-using.raw @@ -0,0 +1,14 @@ + +=============================================================================== +Services [vpls] Customer 4020 +=============================================================================== +ServiceId Type Adm Opr CustomerId Service Name +------------------------------------------------------------------------------- +24728 VPLS Up Down 4020 testservice1 +24729 VPLS Up Up 4020 test-service2 +24730 VPLS Up Down 4020 testservice3 +24731 VPLS Up Down 4020 testservice5 +------------------------------------------------------------------------------- +Matching Services : 4 +------------------------------------------------------------------------------- +=============================================================================== diff --git a/tests/alcatel_sros/show_service_service-using/show_service_service-using.yml b/tests/alcatel_sros/show_service_service-using/show_service_service-using.yml new file mode 100644 index 0000000000..74c612ba82 --- /dev/null +++ b/tests/alcatel_sros/show_service_service-using/show_service_service-using.yml @@ -0,0 +1,26 @@ +--- +parsed_sample: + - admin_status: "Up" + customer_id: "4020" + operational_status: "Down" + service_id: "24728" + service_name: "testservice1" + type: "VPLS" + - admin_status: "Up" + customer_id: "4020" + operational_status: "Up" + service_id: "24729" + service_name: "test-service2" + type: "VPLS" + - admin_status: "Up" + customer_id: "4020" + operational_status: "Down" + service_id: "24730" + service_name: "testservice3" + type: "VPLS" + - admin_status: "Up" + customer_id: "4020" + operational_status: "Down" + service_id: "24731" + service_name: "testservice5" + type: "VPLS"