Skip to content

Commit

Permalink
Create xr show controllers hundred gig all, add test files for show c… (
Browse files Browse the repository at this point in the history
  • Loading branch information
itdependsnetworks authored Dec 17, 2022
1 parent aa8b17d commit 1358b6b
Show file tree
Hide file tree
Showing 6 changed files with 8,793 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
Value Filldown INTERFACE (\S+)
Value Filldown ADMIN_STATE (\S+)
Value Filldown OPS_STATE (\S+)
Value Filldown VENDOR (\S+)
Value Filldown PART_NUM (\S+)
Value Filldown SERIAL_NUM (\S+)
Value LED_STATE (.*)
Value MEDIA_TYPE (.*)
Value TEMPERATURE_VALUE (\S+)
Value VOLTAGE_VALUE (\S+)
Value DOM_ALARMS (.*)
Value LANE (\d+)
Value WAVELENGTH (\S+)
Value RX_VALUE_DBM (\S+)
Value RX_VALUE_MW (\S+)
Value TX_VALUE_DBM (\S+)
Value TX_VALUE_MW (\S+)
Value LASER_BIAS (\S+)
Value TEMPERATURE_ALARM_HIGH (\S+)
Value TEMPERATURE_ALARM_LOW (\S+)
Value TEMPERATURE_WARN_HIGH (\S+)
Value TEMPERATURE_WARN_LOW (\S+)
Value VOLTAGE_ALARM_HIGH (\S+)
Value VOLTAGE_ALARM_LOW (\S+)
Value VOLTAGE_WARN_HIGH (\S+)
Value VOLTAGE_WARN_LOW (\S+)
Value AMPS_ALARM_HIGH (\S+)
Value AMPS_ALARM_LOW (\S+)
Value AMPS_WARN_HIGH (\S+)
Value AMPS_WARN_LOW (\S+)
Value RX_ALARM_MW_HIGH (\S+)
Value RX_ALARM_MW_LOW (\S+)
Value RX_WARN_MW_HIGH (\S+)
Value RX_WARN_MW_LOW (\S+)
Value TX_ALARM_MW_HIGH (\S+)
Value TX_ALARM_MW_LOW (\S+)
Value TX_WARN_MW_HIGH (\S+)
Value TX_WARN_MW_LOW (\S+)
Value RX_ALARM_DBM_HIGH (\S+)
Value RX_ALARM_DBM_LOW (\S+)
Value RX_WARN_DBM_HIGH (\S+)
Value RX_WARN_DBM_LOW (\S+)
Value TX_ALARM_DBM_HIGH (\S+)
Value TX_ALARM_DBM_LOW (\S+)
Value TX_WARN_DBM_HIGH (\S+)
Value TX_WARN_DBM_LOW (\S+)
Value FEC_CORRECTED (\d+)
Value FEC_UNCORRECTED (\d+)
Value MAC_OPS_ADD (\S+)
Value MAC_BIA_ADD (\S+)
Value AUTONEGOTIATION (\S+)
Value SPEED (\S+)
Value DUPLEX (.*)
Value FLOW_CONTROL (\S+)
Value LOOPBACK (.*)
Value MTU (\d+)
Value MRU (\d+)
Value FEC (\S+)

Start
^Operational\s+data\s+for\s+interface\s+${INTERFACE}: -> StateChanger

StateChanger
^State: -> State
^Phy: -> Phy
^\s+Alarm.+Alarm -> AlarmHeader
^\s+Statistics: -> Stats
^Lane -> Lanes
^MAC\s+address\s+information: -> MacInfo
^Operational\s+data\s+for\s+interface\s+${INTERFACE}:
^Operational\s+values: -> OpsValues
^Autonegotiation\s+disabled.*
^Management\s+information\s+for\s+interface -> Ender
^$$
^\s+$$
^.* -> Error "LINE NOT FOUND"

State
^\s+Administrative\s+state:\s+${ADMIN_STATE}
^\s+Operational\s+state:\s+${OPS_STATE}
^\s+LED\s+state:\s+${LED_STATE}
^Autonegotiation\s+${AUTONEGOTIATION}
^\s+$$ -> Record StateChanger
^$$ -> Record StateChanger
^.* -> Error "LINE NOT FOUND"

Phy
^\s+Media\s+type:\s+${MEDIA_TYPE}
^\s+Optics:
^\s+Vendor:\s+${VENDOR}
^\s+Part\s+number:\s+${PART_NUM}
^\s+Serial\s+number:\s+${SERIAL_NUM}
^\s+Wavelength:\s+${WAVELENGTH}\s+nm
^\s+Digital\s+Optical\s+Monitoring:
^\s+Transceiver\s+Temp:\s+${TEMPERATURE_VALUE}
^\s+Transceiver\s+Voltage:\s+${VOLTAGE_VALUE}\s+V
^\s+Alarms.*high
^\s+\(L\).+low
^\s+Wavelength.+Bias
^\s+Lane.+\(mA\) -> Record
^\s+$$
^$$ -> Record StateChanger
^.* -> Error "LINE NOT FOUND"

Lanes
^\s+${LANE}\s+${WAVELENGTH}\s+${TX_VALUE_DBM}\s+${TX_VALUE_MW}\s+${RX_VALUE_DBM}\s+${RX_VALUE_MW}\s+${LASER_BIAS} -> Record
^\s+DOM\s+alarms: -> Dom
^\s*$$ -> StateChanger
^.* -> Error "LINE NOT FOUND"

Dom
^\s+${DOM_ALARMS} -> Record
^\s*$$ -> StateChanger
^.* -> Error "LINE NOT FOUND"

AlarmHeader
^\s+Thresholds.+Low\s+Low
^\s+--.+-- -> AlarmThresholds
^.* -> Error "LINE NOT FOUND"

AlarmThresholds
^\s+Transceiver\s+Temp\s+\(C\):\s+${TEMPERATURE_ALARM_HIGH}\s+${TEMPERATURE_WARN_HIGH}\s+${TEMPERATURE_WARN_LOW}\s+${TEMPERATURE_ALARM_LOW}
^\s+Transceiver\s+Voltage\s+\(V\):\s+${VOLTAGE_ALARM_HIGH}\s+${VOLTAGE_WARN_HIGH}\s+${VOLTAGE_WARN_LOW}\s+${VOLTAGE_ALARM_LOW}
^\s+Laser\s+Bias\s+\(mA\):\s+${AMPS_ALARM_HIGH}\s+${AMPS_WARN_HIGH}\s+${AMPS_WARN_LOW}\s+${AMPS_ALARM_LOW}
^\s+Transmit\s+Power\s+\(mW\):\s+${TX_ALARM_MW_HIGH}\s+${TX_WARN_MW_HIGH}\s+${TX_WARN_MW_LOW}\s+${TX_ALARM_MW_LOW}
^\s+Transmit\s+Power\s+\(dBm\):\s+${TX_ALARM_DBM_HIGH}\s+${TX_WARN_DBM_HIGH}\s+${TX_WARN_DBM_LOW}\s+${TX_ALARM_DBM_LOW}
^\s+Receive\s+Power\s+\(mW\):\s+${RX_ALARM_MW_HIGH}\s+${RX_WARN_MW_HIGH}\s+${RX_WARN_MW_LOW}\s+${RX_ALARM_MW_LOW}
^\s+Receive\s+Power\s+\(dBm\):\s+${RX_ALARM_DBM_HIGH}\s+${RX_WARN_DBM_HIGH}\s+${RX_WARN_DBM_LOW}\s+${RX_ALARM_DBM_LOW} -> Record StateChanger
^.* -> Error "LINE NOT FOUND"

Stats
^\s+FEC:
^\s+Corrected\s+Codeword\s+Count:\s+${FEC_CORRECTED}
^\s+Uncorrected\s+Codeword\s+Count:\s+${FEC_UNCORRECTED} -> Record
^\s+$$ -> StateChanger
^.* -> Error "LINE NOT FOUND"

MacInfo
^\s+Operational\s+address:\s+${MAC_OPS_ADD}
^\s+Burnt-in\s+address:\s+${MAC_BIA_ADD}
^\s+No\s+unicast.*
^\s+Operating\s+in.*
^\s+$$ -> Record StateChanger
^$$ -> Record StateChanger
^.* -> Error "LINE NOT FOUND"

OpsValues
^\s+Speed:\s+${SPEED}
^\s+Duplex:\s+${DUPLEX}
^\s+Flowcontrol:\s+${FLOW_CONTROL}
^\s+Loopback:\s+${LOOPBACK}
^\s+MTU:\s+${MTU}
^\s+MRU:\s+${MRU}
^\s+Forward\s+error\s+correction:\s+${FEC}
^\s+Inter\-pack.*
^\s+BER\s+monitoring:.*
^\s+Signal.*
^\s+$$ -> Record StateChanger
^$$ -> Record StateChanger
^.* -> Error "LINE NOT FOUND"

Ender
^.*

EOF
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ cisco_xr_show_platform_summary_location_all.textfsm, .*, cisco_xr, sh[[ow]] plat
cisco_xr_show_ipv4_vrf_all_interface_brief.textfsm, .*, cisco_xr, sh[[ow]] ipv4 vrf (\S+) int[[erface]] br[[ief]]
cisco_xr_show_ospf_vrf_all_interface_brief.textfsm, .*, cisco_xr, sh[[ow]] ospf vrf (\S+) int[[erface]] brief
cisco_xr_show_controller_fabric_plane_all.textfsm, .*, cisco_xr, sh[[ow]] controller fab[[ric]] pla[[ne]] all
cisco_xr_show_controllers_hundredgige_all.textfsm, .*, cisco_xr, sh[[ow]] controllers hund[[redgige]] all
cisco_xr_show_configuration_commit_list.textfsm, .*, cisco_xr, sh[[ow]] conf[[iguration]] c[[ommit]] l[[ist]]
cisco_xr_show_asic-errors_all_location.textfsm, .*, cisco_xr, sh[[ow]] asic-er[[rors]] all loc[[ation]]
cisco_xr_show_bgp_instance_all_summary.textfsm, .*, cisco_xr, sh[[ow]] bg[[p]] ins[[tance]] (\S+) sum[[mary]]
Expand Down
Loading

0 comments on commit 1358b6b

Please sign in to comment.