Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some sros commands #824

Merged
merged 2 commits into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions templates/alcatel_sros_show_lag.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Value LAG_ID (\d+)
Value ADM (up|down)
Value OPR (up|down)
Value WEIGHTED (Yes|No)
Value THRESHOLD (\d+)
Value UP_COUNT (\d+)
Value MC_ACT_STDBY (N/A|active|standby)

Start
^----------- -> Lag

Lag
^${LAG_ID}\s+${ADM}\s+${OPR}\s+${WEIGHTED}\s+${THRESHOLD}\s+${UP_COUNT}\s+${MC_ACT_STDBY}(\s|$$) -> Record
^\s*$$
^-----------
^===========
^Total
^. -> Error
25 changes: 25 additions & 0 deletions templates/alcatel_sros_show_port.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Value PORT_ID (\S+)
Value ADMIN_STATE (Up|Down)
Value LINK (Yes|No)
Value PORT_STATE (Up|Down|Ghost|Link Up)
Value CFG_MTU (\d+)
Value OPER_MTU (\d+)
Value LAG (\d+|-)
Value PORT_MODE (\S+)
Value PORT_ENCP (\S+)
Value PORT_TYPE (\S+)
Value C_QS_S_XFP_MDIMDX (.*)

Start
^----------- -> Port

Port
^${PORT_ID}\s+${ADMIN_STATE}\s+${PORT_STATE}\s+conn\s*${C_QS_S_XFP_MDIMDX} -> Record
^${PORT_ID}\s+${ADMIN_STATE}\s+${LINK}\s+${PORT_STATE}\s+${CFG_MTU}\s+${OPER_MTU}\s+${LAG}\s+${PORT_MODE}\s+${PORT_ENCP}\s+${PORT_TYPE}\s*${C_QS_S_XFP_MDIMDX} -> Record
^\s*$$
^-----------
^===========
^Port
^Id
^\*\sindicates
^. -> Error
24 changes: 24 additions & 0 deletions templates/alcatel_sros_show_router_bgp_summary_family.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Value NEIGHBOR (\d+\.\d+\.\d+\.\d+|[0-9a-f:]*)
Value Required AS (\d+\**)
Value PKTRCVD (\d+\**)
Value PKTSENT (\d+\**)
Value INQ (\d+\**)
Value OUTQ (\d+\**)
Value UP_DOWN (\S+)
Value STATE (\w+)
Value RCV (\d+)
Value ACT (\d+)
Value SENT (\d+)

Start
^----------- -> Neighbor

Neighbor
^${NEIGHBOR}(\s|$$) -> NeighborData

NeighborData
^\s+${AS}\s+${PKTRCVD}\s+${PKTSENT}\s+${INQ}\s+${OUTQ}\s+${UP_DOWN}\s+(${STATE}|${RCV}/${ACT}/${SENT})(\s|$$) -> Record Neighbor
^.*indicates
^-----------
^\s*$$
^. -> Error
18 changes: 18 additions & 0 deletions templates/alcatel_sros_show_router_isis_adjacency.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Value SYSTEM_ID (\S+)
Value USAGE (\S+)
Value STATE (Up|Down)
Value HOLD (\d+)
Value INTERFACE (\S+)
Value MT_ID (\S+)

Start
^----------- -> Adjacency

Adjacency
^${SYSTEM_ID}\s+${USAGE}\s+${STATE}\s+${HOLD}\s+${INTERFACE}\s+${MT_ID} -> Record
^\s*$$
^-----------
^===========
^Adjacencies
^. -> Error

17 changes: 17 additions & 0 deletions templates/alcatel_sros_show_router_isis_interface.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Value INTERFACE (\S+)
Value LEVEL (\S+)
Value CIRCID (\d+)
Value OPER_STATE (Up|Down)
Value METRIC_L1 (\d+)
Value METRIC_L2 (\d+)

Start
^----------- -> Interface

Interface
^${INTERFACE}\s+${LEVEL}\s+${CIRCID}\s+${OPER_STATE}\s+${METRIC_L1}/${METRIC_L2} -> Record
^\s*$$
^-----------
^===========
^Interfaces
^. -> Error
24 changes: 24 additions & 0 deletions templates/alcatel_sros_show_router_ldp_interface.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Value INTERFACE (\S+)
Value ADM (Up|Dwn)
Value OPR (Up|Dwn)
Value SUB_INTERFACE (ipv\d)
Value SUB_INTERFACE_ADM (Up|Dwn)
Value SUB_INTERFACE_OPR (Up|Dwn)
Value HELLO_FCTR (\d+)
Value HOLDTIME (\d+)
Value KA_FCTR (\d+)
Value KA_TIME (\d+)
Value TRANSPORT_ADDRESS (\S+)

Start
^----------- -> Interface

Interface
^${INTERFACE}\s+${ADM}/${OPR}(\s|$$) -> SubInterface

SubInterface
^\s+${SUB_INTERFACE}\s+${SUB_INTERFACE_ADM}/${SUB_INTERFACE_OPR}\s+${HELLO_FCTR}\s+${HOLDTIME}\s+${KA_FCTR}\s+${KA_TIME}\s+${TRANSPORT_ADDRESS}(\s|$$) -> Record Interface
^No.\s+of\s+Interfaces
^-----------
^\s*$$
^. -> Error
20 changes: 20 additions & 0 deletions templates/alcatel_sros_show_router_pim_interface.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Value INTERFACE (\S+)
Value ADM (Up|Down)
Value OPR (Up|Down)
Value DR ((\d+\.\d+\.\d+\.\d+|[0-9a-f:]*)|N/A)
Value DR_PRTY (\d+|N/A)
Value HELLO_INTVL (\d+)
Value MCAST_SEND (\S+)

Start
^----------- -> Interface

Interface
^${INTERFACE}\s+${ADM}\s+${OPR}\s+${DR_PRTY}\s+${HELLO_INTVL}\s+${MCAST_SEND}(\s|$$) -> Dr

Dr
^\s+${DR}(\s|$$) -> Record Interface
^No.\s+of\s+Interfaces
^-----------
^\s*$$
^. -> Error
7 changes: 7 additions & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ Template, Hostname, Platform, Command
alcatel_aos_show_vlan.textfsm, .*, alcatel_aos, show vlan

alcatel_sros_show_router_bgp_routes_vpn-ipv4.textfsm, .*, alcatel_sros, sh[[ow]] router bgp rou[[tes]] vpn-ipv4
alcatel_sros_show_router_bgp_summary_family.textfsm, .*, alcatel_sros, sh[[ow]] router bgp sum[[mary]] family
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_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_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

arista_eos_show_mac_security_participants_detail.textfsm, .*, arista_eos, sh[[ow]] ma[[c]] secu[[rity]] part[[icipants]] det[[ail]]
arista_eos_show_interfaces_transceiver_detail.textfsm, .*, arista_eos, sh[[ow]] inte[[rfaces]] tr[[ansceiver]] de[[tail]]
Expand Down
40 changes: 40 additions & 0 deletions tests/alcatel_sros/show_lag/show_lag.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

===============================================================================
Lag Data
===============================================================================
Lag-id Adm Opr Weighted Threshold Up-Count MC Act/Stdby
-------------------------------------------------------------------------------
1 up up No 0 2 N/A
2 up up No 0 2 N/A
3 up up No 0 1 N/A
4 down down No 0 0 N/A
5 down down No 0 0 N/A
10 down down No 0 0 N/A
20 up down No 0 0 standby
70 down down No 0 0 N/A
80 up down No 0 0 N/A
90 down down No 0 0 N/A
100 up up No 0 1 N/A
101 up up No 0 1 N/A
102 up up No 0 1 N/A
103 up up No 0 1 active
104 up up No 0 1 N/A
105 up up No 0 1 N/A
106 up up No 0 1 N/A
107 up up No 0 1 N/A
108 up up No 0 1 N/A
109 up up No 0 1 N/A
110 up up No 0 1 active
111 up up No 0 1 N/A
112 up up No 0 1 N/A
114 up up No 0 1 N/A
115 up up No 0 1 N/A
120 up up No 0 1 N/A
124 down down No 0 0 N/A
140 up up No 0 1 N/A
150 down down No 0 0 N/A
153 up up No 0 1 active
180 down down No 0 0 N/A
-------------------------------------------------------------------------------
Total Lag-ids: 31 Single Chassis: 27 MC Act: 3 MC Stdby: 1
===============================================================================
Loading