From 739f2732ed51cbade9a3799a45f1f8267c8b4ff0 Mon Sep 17 00:00:00 2001 From: h4ndzdatm0ld Date: Thu, 11 Mar 2021 22:17:25 +0000 Subject: [PATCH 1/6] new alcatel_sros templ: service sdp --- .../alcatel_sros_show_service_sdp.textfsm | 28 ++++++++++ templates/index | 1 + .../alcatel_sros_show_service_sdp.raw | 18 ++++++ .../alcatel_sros_show_service_sdp.yml | 56 +++++++++++++++++++ 4 files changed, 103 insertions(+) create mode 100644 templates/alcatel_sros_show_service_sdp.textfsm create mode 100644 tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.raw create mode 100644 tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.yml diff --git a/templates/alcatel_sros_show_service_sdp.textfsm b/templates/alcatel_sros_show_service_sdp.textfsm new file mode 100644 index 0000000000..26297a8e60 --- /dev/null +++ b/templates/alcatel_sros_show_service_sdp.textfsm @@ -0,0 +1,28 @@ +Value Required SDP_ID (\d+) +Value Required ADM_MTU (\d+) +Value Required OPR_MTU (\d+) +Value FAR_END (\d+.\d+.\d+.\d+) +Value Required ADM (Up|Down) +Value Required OPR (Up|Down) +Value Required DEL (\S+) +Value Required LSP (\S+) +Value Required SIG (\S+) + +Start + ^=+ + ^Services: + ^SdpId\s+AdmMTU\s+OprMTU\s+Far\s+End\s+Adm\s+Opr\s+Del\s+LSP\s+Sig -> SDP + ^-+ + ^\s*$$ + ^. -> Error + +SDP + ^${SDP_ID}\s+${ADM_MTU}\s+${OPR_MTU}\s+${FAR_END}\s+${ADM}\s+${OPR}\s+${DEL}\s+${LSP}\s+${SIG} -> Record + ^${SDP_ID}\s+${ADM_MTU}\s+${OPR_MTU}\s+${ADM}\s+${OPR}\s+${DEL}\s+${LSP}\s+${SIG} -> Record + ^-+ + ^Number + ^Legend + ^\s+I\s= + ^\s*$$ + ^=+ + ^. -> Error diff --git a/templates/index b/templates/index index acfbb5fb2c..526330077f 100644 --- a/templates/index +++ b/templates/index @@ -21,6 +21,7 @@ alcatel_sros_show_router_mpls_interface.textfsm, .*, alcatel_sros, sh[[ow]] rout 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_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]] alcatel_sros_show_port.textfsm, .*, alcatel_sros, show port alcatel_sros_show_lag.textfsm, .*, alcatel_sros, show lag diff --git a/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.raw b/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.raw new file mode 100644 index 0000000000..737b597fb2 --- /dev/null +++ b/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.raw @@ -0,0 +1,18 @@ + +============================================================================ +Services: Service Destination Points +============================================================================ +SdpId AdmMTU OprMTU Far End Adm Opr Del LSP Sig +---------------------------------------------------------------------------- +1 0 9170 192.168.0.1 Down Down GRE n/a TLDP +31 0 0 10.10.10.1 Up Down MPLS R TLDP +32 0 0 10.10.10.2 Up Down MPLS R TLDP +34 0 0 10.10.10.4 Up Down MPLS R TLDP +38 0 492 10.10.10.8 Up Down MPLS R TLDP +2000 0 0 Down Down GRE n/a TLDP +---------------------------------------------------------------------------- +Number of SDPs : 6 +---------------------------------------------------------------------------- +Legend: R = RSVP, L = LDP, B = BGP, M = MPLS-TP, n/a = Not Applicable + I = SR-ISIS, O = SR-OSPF, T = SR-TE, F = FPE +============================================================================ \ No newline at end of file diff --git a/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.yml b/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.yml new file mode 100644 index 0000000000..4ef283871d --- /dev/null +++ b/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.yml @@ -0,0 +1,56 @@ +--- +parsed_sample: + - adm: "Down" + adm_mtu: "0" + del: "GRE" + far_end: "192.168.0.1" + lsp: "n/a" + opr: "Down" + opr_mtu: "9170" + sdp_id: "1" + sig: "TLDP" + - adm: "Up" + adm_mtu: "0" + del: "MPLS" + far_end: "10.10.10.1" + lsp: "R" + opr: "Down" + opr_mtu: "0" + sdp_id: "31" + sig: "TLDP" + - adm: "Up" + adm_mtu: "0" + del: "MPLS" + far_end: "10.10.10.2" + lsp: "R" + opr: "Down" + opr_mtu: "0" + sdp_id: "32" + sig: "TLDP" + - adm: "Up" + adm_mtu: "0" + del: "MPLS" + far_end: "10.10.10.4" + lsp: "R" + opr: "Down" + opr_mtu: "0" + sdp_id: "34" + sig: "TLDP" + - adm: "Up" + adm_mtu: "0" + del: "MPLS" + far_end: "10.10.10.8" + lsp: "R" + opr: "Down" + opr_mtu: "492" + sdp_id: "38" + sig: "TLDP" + - adm: "Down" + adm_mtu: "0" + del: "GRE" + far_end: "" + lsp: "n/a" + opr: "Down" + opr_mtu: "0" + sdp_id: "2000" + sig: "TLDP" From 247faaf61a28e3297837fd00dc6066b285aa07c8 Mon Sep 17 00:00:00 2001 From: h4ndzdatm0ld Date: Thu, 11 Mar 2021 22:21:06 +0000 Subject: [PATCH 2/6] new alcatel_sros templ: service sdp --- .../show_service_sdp/alcatel_sros_show_service_sdp.raw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.raw b/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.raw index 737b597fb2..3247d43e1a 100644 --- a/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.raw +++ b/tests/alcatel_sros/show_service_sdp/alcatel_sros_show_service_sdp.raw @@ -15,4 +15,4 @@ Number of SDPs : 6 ---------------------------------------------------------------------------- Legend: R = RSVP, L = LDP, B = BGP, M = MPLS-TP, n/a = Not Applicable I = SR-ISIS, O = SR-OSPF, T = SR-TE, F = FPE -============================================================================ \ No newline at end of file +============================================================================ From fea89235f255f14e6966ecbc6f7c292fd878f81b Mon Sep 17 00:00:00 2001 From: Hugo Tinoco <43675476+h4ndzdatm0ld@users.noreply.github.com> Date: Thu, 11 Mar 2021 16:05:12 -0700 Subject: [PATCH 3/6] Update templates/alcatel_sros_show_service_sdp.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- templates/alcatel_sros_show_service_sdp.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/alcatel_sros_show_service_sdp.textfsm b/templates/alcatel_sros_show_service_sdp.textfsm index 26297a8e60..c98e1c7d71 100644 --- a/templates/alcatel_sros_show_service_sdp.textfsm +++ b/templates/alcatel_sros_show_service_sdp.textfsm @@ -11,7 +11,7 @@ Value Required SIG (\S+) Start ^=+ ^Services: - ^SdpId\s+AdmMTU\s+OprMTU\s+Far\s+End\s+Adm\s+Opr\s+Del\s+LSP\s+Sig -> SDP + ^SdpId\s+AdmMTU\s+OprMTU\s+Far\s+End\s+Adm\s+Opr\s+Del\s+LSP\s+Sig\s*$$ ^-+ ^\s*$$ ^. -> Error From 26bdf96ccf5f56c5de849497b2cbf8e868f8666a Mon Sep 17 00:00:00 2001 From: Hugo Tinoco <43675476+h4ndzdatm0ld@users.noreply.github.com> Date: Thu, 11 Mar 2021 16:05:18 -0700 Subject: [PATCH 4/6] Update templates/alcatel_sros_show_service_sdp.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- templates/alcatel_sros_show_service_sdp.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/alcatel_sros_show_service_sdp.textfsm b/templates/alcatel_sros_show_service_sdp.textfsm index c98e1c7d71..5582aa42a5 100644 --- a/templates/alcatel_sros_show_service_sdp.textfsm +++ b/templates/alcatel_sros_show_service_sdp.textfsm @@ -12,7 +12,7 @@ Start ^=+ ^Services: ^SdpId\s+AdmMTU\s+OprMTU\s+Far\s+End\s+Adm\s+Opr\s+Del\s+LSP\s+Sig\s*$$ - ^-+ + ^-+ -> SDP ^\s*$$ ^. -> Error From d4af459610eb3eb7693f31c9868a5d7b0e06636f Mon Sep 17 00:00:00 2001 From: Hugo Tinoco <43675476+h4ndzdatm0ld@users.noreply.github.com> Date: Thu, 11 Mar 2021 16:05:23 -0700 Subject: [PATCH 5/6] Update templates/alcatel_sros_show_service_sdp.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- templates/alcatel_sros_show_service_sdp.textfsm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/alcatel_sros_show_service_sdp.textfsm b/templates/alcatel_sros_show_service_sdp.textfsm index 5582aa42a5..7c372ecc73 100644 --- a/templates/alcatel_sros_show_service_sdp.textfsm +++ b/templates/alcatel_sros_show_service_sdp.textfsm @@ -26,3 +26,5 @@ SDP ^\s*$$ ^=+ ^. -> Error + +Done From 61dd7ad3271dfd65244a54fa3a4e453f1d65fe96 Mon Sep 17 00:00:00 2001 From: Hugo Tinoco <43675476+h4ndzdatm0ld@users.noreply.github.com> Date: Thu, 11 Mar 2021 16:05:29 -0700 Subject: [PATCH 6/6] Update templates/alcatel_sros_show_service_sdp.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- templates/alcatel_sros_show_service_sdp.textfsm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/templates/alcatel_sros_show_service_sdp.textfsm b/templates/alcatel_sros_show_service_sdp.textfsm index 7c372ecc73..6e9f4a14ba 100644 --- a/templates/alcatel_sros_show_service_sdp.textfsm +++ b/templates/alcatel_sros_show_service_sdp.textfsm @@ -19,10 +19,7 @@ Start SDP ^${SDP_ID}\s+${ADM_MTU}\s+${OPR_MTU}\s+${FAR_END}\s+${ADM}\s+${OPR}\s+${DEL}\s+${LSP}\s+${SIG} -> Record ^${SDP_ID}\s+${ADM_MTU}\s+${OPR_MTU}\s+${ADM}\s+${OPR}\s+${DEL}\s+${LSP}\s+${SIG} -> Record - ^-+ - ^Number - ^Legend - ^\s+I\s= + ^-+ -> Done ^\s*$$ ^=+ ^. -> Error