From 4947aaaeea7e262d4937d946f2724c1dbb50b338 Mon Sep 17 00:00:00 2001 From: Hugo Tinoco <43675476+h4ndzdatm0ld@users.noreply.github.com> Date: Thu, 11 Mar 2021 16:24:53 -0700 Subject: [PATCH] New Template: alcatel_sros_show_router_rsvp_interface (#884) --- ...el_sros_show_router_rsvp_interface.textfsm | 26 ++++++++++++++++ templates/index | 1 + .../show_router_rsvp_interface.raw | 13 ++++++++ .../show_router_rsvp_interface.yml | 30 +++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 templates/alcatel_sros_show_router_rsvp_interface.textfsm create mode 100644 tests/alcatel_sros/show_router_rsvp_interface/show_router_rsvp_interface.raw create mode 100644 tests/alcatel_sros/show_router_rsvp_interface/show_router_rsvp_interface.yml diff --git a/templates/alcatel_sros_show_router_rsvp_interface.textfsm b/templates/alcatel_sros_show_router_rsvp_interface.textfsm new file mode 100644 index 0000000000..3c1f7f0e0a --- /dev/null +++ b/templates/alcatel_sros_show_router_rsvp_interface.textfsm @@ -0,0 +1,26 @@ +Value Required INTERFACE (\S+) +Value Required TOTAL_SESSIONS (\d+|-) +Value Required ACTIVE_SESSIONS (\d+|-) +Value Required TOTAL_BW (\d+|-) +Value Required RESV_BW (\d+|-) +Value Required ADMIN_STATE (Up|Dwn|Down) +Value Required OPER_STATE (Up|Dwn|Down) + +Start + ^=+ + ^RSVP\s+Interfaces + ^Interface\s+Total\s+Active\s+Total\s+BW\s+Resv\s+BW\s+Adm\s+Opr\s*$$ + ^\s+Sessions\s+Sessions\s+\(Mbps\)\s+\(Mbps\) + ^-+ -> Interface + ^\s*$$ + ^. -> Error + +Interface + ^${INTERFACE}\s*${TOTAL_SESSIONS}\s*${ACTIVE_SESSIONS}\s*${TOTAL_BW}\s*${RESV_BW}\s*${ADMIN_STATE}\s*${OPER_STATE} -> Record + ^Interfaces + ^=+ + ^-+ -> Done + ^\s*$$ + ^. -> Error + +Done diff --git a/templates/index b/templates/index index 7702ffcaac..631375838b 100644 --- a/templates/index +++ b/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_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_id_base.textfsm, .*, alcatel_sros, sh[[ow]] serv[[ice]] id ba[[se]] diff --git a/tests/alcatel_sros/show_router_rsvp_interface/show_router_rsvp_interface.raw b/tests/alcatel_sros/show_router_rsvp_interface/show_router_rsvp_interface.raw new file mode 100644 index 0000000000..4b02d3d53a --- /dev/null +++ b/tests/alcatel_sros/show_router_rsvp_interface/show_router_rsvp_interface.raw @@ -0,0 +1,13 @@ +=============================================================================== +RSVP Interfaces +=============================================================================== +Interface Total Active Total BW Resv BW Adm Opr + Sessions Sessions (Mbps) (Mbps) +------------------------------------------------------------------------------- +system - - - - Up Up +TO_IOSXR 0 0 10000 0 Dwn Dwn +TO_R1 0 0 10000 0 Up Up +TO_R4 0 0 10000 0 Up Up +------------------------------------------------------------------------------- +Interfaces : 4 +=============================================================================== diff --git a/tests/alcatel_sros/show_router_rsvp_interface/show_router_rsvp_interface.yml b/tests/alcatel_sros/show_router_rsvp_interface/show_router_rsvp_interface.yml new file mode 100644 index 0000000000..e50ff2c2b6 --- /dev/null +++ b/tests/alcatel_sros/show_router_rsvp_interface/show_router_rsvp_interface.yml @@ -0,0 +1,30 @@ +--- +parsed_sample: + - active_sessions: "-" + admin_state: "Up" + interface: "system" + oper_state: "Up" + resv_bw: "-" + total_bw: "-" + total_sessions: "-" + - active_sessions: "0" + admin_state: "Dwn" + interface: "TO_IOSXR" + oper_state: "Dwn" + resv_bw: "0" + total_bw: "10000" + total_sessions: "0" + - active_sessions: "0" + admin_state: "Up" + interface: "TO_R1" + oper_state: "Up" + resv_bw: "0" + total_bw: "10000" + total_sessions: "0" + - active_sessions: "0" + admin_state: "Up" + interface: "TO_R4" + oper_state: "Up" + resv_bw: "0" + total_bw: "10000" + total_sessions: "0"