From eabcf898352afb6706fe07a2e3cf8ed844fbdfc4 Mon Sep 17 00:00:00 2001 From: Hugo Tinoco <43675476+h4ndzdatm0ld@users.noreply.github.com> Date: Sat, 13 Mar 2021 21:41:24 -0700 Subject: [PATCH] New Template: alcatel_sros_show_service_sdp-using.textfsm (#891) --- ...lcatel_sros_show_service_sdp-using.textfsm | 27 ++++++++++++ ntc_templates/templates/index | 1 + .../alcatel_sros_show_service_sdp-using.raw | 15 +++++++ .../alcatel_sros_show_service_sdp-using.yml | 42 +++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 ntc_templates/templates/alcatel_sros_show_service_sdp-using.textfsm create mode 100644 tests/alcatel_sros/show_service_sdp-using/alcatel_sros_show_service_sdp-using.raw create mode 100644 tests/alcatel_sros/show_service_sdp-using/alcatel_sros_show_service_sdp-using.yml diff --git a/ntc_templates/templates/alcatel_sros_show_service_sdp-using.textfsm b/ntc_templates/templates/alcatel_sros_show_service_sdp-using.textfsm new file mode 100644 index 0000000000..cf3dd928b9 --- /dev/null +++ b/ntc_templates/templates/alcatel_sros_show_service_sdp-using.textfsm @@ -0,0 +1,27 @@ +Value Required SERVICE_ID (\d+) +Value Required SDP_ID (\d+) +Value Required SDP_SVC_ID (\d+) +Value Required TYPE (\S+) +Value Required FAR_END (\S+) +Value Required OPER_STATE (\S+) +Value Required INGRESS_LABEL (\S+) +Value Required EGRESS_LABEL (\S+) + +Start + ^=+ + ^SDP\s+Using + ^SvcId\s+SdpId\s+Type\s+Far\s+End\s+Opr\s+I.Label\s+E.Label\s*$$ -> SDP + ^\s*$$ + ^. -> Error + +SDP + ^\s+State + ^-+ + ^${SERVICE_ID}\s+${SDP_ID}:${SDP_SVC_ID}\s+${TYPE}\s+${FAR_END}\s+${OPER_STATE}\s+${INGRESS_LABEL}\s+${EGRESS_LABEL} -> Record + ^-+ -> Done + ^Number\s+of + ^=+ + ^\s*$$ + ^. -> Error + +Done diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 631375838b..6e035adcfc 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -21,6 +21,7 @@ alcatel_sros_show_router_mpls_interface.textfsm, .*, alcatel_sros, sh[[ow]] rout 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]] +alcatel_sros_show_service_sdp-using.textfsm, .*, alcatel_sros, sh[[ow]] service sdp-using alcatel_sros_show_service_id_base.textfsm, .*, alcatel_sros, sh[[ow]] serv[[ice]] id ba[[se]] alcatel_sros_show_service_sdp.textfsm, .*, alcatel_sros, sh[[ow]] service sdp alcatel_sros_oam_mac-ping.textfsm, .*, alcatel_sros, oam mac-pi[[ng]] diff --git a/tests/alcatel_sros/show_service_sdp-using/alcatel_sros_show_service_sdp-using.raw b/tests/alcatel_sros/show_service_sdp-using/alcatel_sros_show_service_sdp-using.raw new file mode 100644 index 0000000000..226554820a --- /dev/null +++ b/tests/alcatel_sros/show_service_sdp-using/alcatel_sros_show_service_sdp-using.raw @@ -0,0 +1,15 @@ +=============================================================================== +SDP Using +=============================================================================== +SvcId SdpId Type Far End Opr I.Label E.Label + State +------------------------------------------------------------------------------- +200 31:200 Spok 10.10.10.1 Up 524281 524283 +200 34:200 Mesh 10.10.10.4 Down None None +310 32767:4294967295 BgpAd 10.10.10.1 Up 524278 524280 +400 32767:4294967294 BgpAd 10.10.10.1 Up 524277 524279 +401 32767:4294967293 BgpAd 10.10.10.1 Up 524276 524278 +------------------------------------------------------------------------------- +Number of SDPs : 5 +------------------------------------------------------------------------------- +=============================================================================== diff --git a/tests/alcatel_sros/show_service_sdp-using/alcatel_sros_show_service_sdp-using.yml b/tests/alcatel_sros/show_service_sdp-using/alcatel_sros_show_service_sdp-using.yml new file mode 100644 index 0000000000..484618be7b --- /dev/null +++ b/tests/alcatel_sros/show_service_sdp-using/alcatel_sros_show_service_sdp-using.yml @@ -0,0 +1,42 @@ +--- +parsed_sample: + - egress_label: "524283" + far_end: "10.10.10.1" + ingress_label: "524281" + oper_state: "Up" + sdp_id: "31" + sdp_svc_id: "200" + service_id: "200" + type: "Spok" + - egress_label: "None" + far_end: "10.10.10.4" + ingress_label: "None" + oper_state: "Down" + sdp_id: "34" + sdp_svc_id: "200" + service_id: "200" + type: "Mesh" + - egress_label: "524280" + far_end: "10.10.10.1" + ingress_label: "524278" + oper_state: "Up" + sdp_id: "32767" + sdp_svc_id: "4294967295" + service_id: "310" + type: "BgpAd" + - egress_label: "524279" + far_end: "10.10.10.1" + ingress_label: "524277" + oper_state: "Up" + sdp_id: "32767" + sdp_svc_id: "4294967294" + service_id: "400" + type: "BgpAd" + - egress_label: "524278" + far_end: "10.10.10.1" + ingress_label: "524276" + oper_state: "Up" + sdp_id: "32767" + sdp_svc_id: "4294967293" + service_id: "401" + type: "BgpAd"