Skip to content

Commit

Permalink
New Template Alcatel AOS: show interfaces status (#1909)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Bear <[email protected]>
  • Loading branch information
evilmonkey19 and mjbear authored Dec 9, 2024
1 parent c22240d commit fded2cb
Show file tree
Hide file tree
Showing 6 changed files with 623 additions and 0 deletions.
31 changes: 31 additions & 0 deletions ntc_templates/templates/alcatel_aos_show_interfaces_status.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Value PORT ((\d+\/?)+)
Value ADMIN_STATUS (\S+)
Value AUTO_NEGOTIATION (\S+)
Value DETECTED_SPEED (\d+)
Value DETECTED_DUPLEX (\S+)
Value DETECTED_HYBRID (\S+)
Value DETECTED_PAUSE (\S+)
Value DETECTED_FEC (\S+)
Value CONFIGURED_SPEED (\S+)
Value CONFIGURED_DUPLEX (\S+)
Value CONFIGURED_HYBRID (\S+)
Value CONFIGURED_PAUSE (\S+)
Value CONFIGURED_FEC (\S+)
Value LINK_TRAP (\S+)
Value ENERGY_EFFICIENT_ETHERNET (\S+)

Start
^\s*-+\+
^\s*${PORT}\s+${AUTO_NEGOTIATION}\s*(-|${DETECTED_SPEED})\s*(-|${DETECTED_DUPLEX})\s*(-|${DETECTED_HYBRID})\s*${CONFIGURED_SPEED}\s*${CONFIGURED_DUPLEX}\s*${CONFIGURED_HYBRID}\s*(-|${LINK_TRAP})\s*$$ -> Record
^\s*${PORT}\s+${ADMIN_STATUS}\s+${AUTO_NEGOTIATION}\s+(-|${DETECTED_SPEED})\s+(-|${DETECTED_DUPLEX})\s+(-|${DETECTED_PAUSE})\s+(-|${DETECTED_FEC})\s+${CONFIGURED_SPEED}\s+${CONFIGURED_DUPLEX}\s+(-|${CONFIGURED_PAUSE})\s+${CONFIGURED_FEC}\s+(-|${LINK_TRAP})\s+${ENERGY_EFFICIENT_ETHERNET}\s*$$ -> Record
^\s*(Chas/\s+)?DETECTED(-VALUES)?\s+CONFIGURED(-VALUES)?\s*$$
# R6 version
^\s*Slot/\s+AutoNego\s+Speed\s+Duplex\s+Hybrid\s+Speed\s+Duplex\s+Hybrid\s+Trap\s*$$
^\s*(\S+\s+\(Mbps\)\s+)+Mode\s+LinkUpDown\s*$$
# R8 version
^\s*Slot/\s+Admin\s+Auto\s+Speed\s+Duplex\s+Pause\s+FEC\s+Speed\s+Duplex\s+Pause\s+FEC\s+Link\s*$$
^\s*Port\s+Status\s+(\S+\s+\(Mbps\)\s+)+Cfg\s+Trap\s+EEE\s*$$
#
^\s*F[A-Z]\s+-\s+Forced
^\s*$$
^.*$$ -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#
Template, Hostname, Platform, Command

alcatel_aos_show_interfaces_status.textfsm, .*, alcatel_aos, sh[[ow]] in[[terfaces]] st[[atus]]
alcatel_aos_show_mac-address-table.textfsm, .*, alcatel_aos, sh[[ow]] mac-(a[[ddress-table]]|l[[earning]])
alcatel_aos_show_port-security.textfsm, .*, alcatel_aos, sh[[ow]] port-[[security]]
alcatel_aos_show_vlan_port.textfsm, .*, alcatel_aos, sh[[ow]] vl[[an]] (p[[ort]]|m[[embers]])
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
DETECTED CONFIGURED
Slot/ AutoNego Speed Duplex Hybrid Speed Duplex Hybrid Trap
Port (Mbps) Type (Mbps) Mode LinkUpDown
-----+--------+------+------+------+--------+------+------+------
1/1 Enable 1000 Full NA Auto Auto NA -
1/2 Enable - - - Auto Auto NA -
1/3 Enable - - - Auto Auto NA -
1/4 Enable - - - Auto Auto NA -
1/5 Enable - - - Auto Auto NA -
1/6 Enable - - - Auto Auto NA -
1/7 Enable - - - Auto Auto NA -
1/8 Enable - - - Auto Auto NA -
1/9 Enable - - - Auto Auto NA -
1/10 Enable - - - Auto Auto NA -
1/11 Enable - - - Auto Auto NA -
1/12 Enable - - - Auto Auto NA -
1/13 Enable - - - Auto Auto NA -
1/14 Enable - - - Auto Auto NA -
1/15 Enable - - - Auto Auto NA -
1/16 Enable - - - Auto Auto NA -
1/17 Enable - - - Auto Auto NA -
1/18 Enable - - - Auto Auto NA -
1/19 Enable - - - Auto Auto NA -
1/20 Enable - - - Auto Auto NA -
1/21 Enable - - - Auto Auto NA -
1/22 Enable - - - Auto Auto NA -
1/23 Enable - - - Auto Auto NA -
1/24 Enable - - - Auto Auto NA -
1/25 Enable 1000 Full NA 1000 Full NA -
1/26 Enable - - - 1000 Full NA -

FF - ForcedFiber PF - PreferredFiber F - Fiber
FC - ForcedCopper PC - PreferredCopper C - Copper
Loading

0 comments on commit fded2cb

Please sign in to comment.