Skip to content

Commit

Permalink
Add Oneaccess templates (#1762)
Browse files Browse the repository at this point in the history
Co-authored-by: mwallraf <[email protected]>
Co-authored-by: Andrea Dainese <[email protected]>
  • Loading branch information
3 people authored Jul 25, 2024
1 parent 9e34cb6 commit 49df6f6
Show file tree
Hide file tree
Showing 32 changed files with 1,533 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ mikrotik_routeros_tool_profile.textfsm, .*, mikrotik_routeros, [[/]]too[[l]] pr[
mikrotik_routeros_user_print.textfsm, .*, mikrotik_routeros, [[/]]us[[er]] p[[rint]]
mikrotik_routeros_ping.textfsm, .*, mikrotik_routeros, [[/]]pin[[g]]

oneaccess_oneos_show_voice_dial-peer_voice_voip_all.textfsm, .*, oneaccess_oneos, sh[[ow]] voice dial-peer voice voip all( al)?
oneaccess_oneos_show_voice_voip-call_active_all.textfsm, .*, oneaccess_oneos, sh[[ow]] voice voip-call active
oneaccess_oneos_show_cellular-radio_equipment.textfsm, .*, oneaccess_oneos, sh[[ow]] cell[[ular-radio]] equipment
oneaccess_oneos_show_policy-interface_output.textfsm, .*, oneaccess_oneos, sh[[ow]] policy-interface output
Expand All @@ -748,6 +749,7 @@ oneaccess_oneos_show_cellular-radio_network.textfsm, .*, oneaccess_oneos, sh[[ow
oneaccess_oneos_show_ip_as-path-access-list.textfsm, .*, oneaccess_oneos, sh[[ow]] ip as-path-access-list
oneaccess_oneos_show_running-config_ip_dhcp.textfsm, .*, oneaccess_oneos, sh[[ow]] run[[ning-config]] (\| be[[gin]] )?ip dhcp
oneaccess_oneos_show_system_secure-crashlog.textfsm, .*, oneaccess_oneos, sh[[ow]] system secure-crashlog
oneaccess_oneos_show_transceiver_equipment.textfsm, .*, oneaccess_oneos, sh[[ow]] transceiver equipment
oneaccess_oneos_show_running-config_bind.textfsm, .*, oneaccess_oneos, sh[[ow]] run[[ning-config]] \|?bind
oneaccess_oneos_show_ip_interface_brief.textfsm, .*, oneaccess_oneos, sh[[ow]] ip int[[erface]] brief
oneaccess_oneos_show_running-config_aaa.textfsm, .*, oneaccess_oneos, sh[[ow]] run[[ning-config]] \|?aaa
Expand All @@ -770,9 +772,12 @@ oneaccess_oneos_show_ip_vrf_brief.textfsm, .*, oneaccess_oneos, sh[[ow]] ip vrf
oneaccess_oneos_show_isdn_active.textfsm, .*, oneaccess_oneos, sh[[ow]] isdn active
oneaccess_oneos_show_interfaces.textfsm, .*, oneaccess_oneos, sh[[ow]] interface[[s]]
oneaccess_oneos_show_route-map.textfsm, .*, oneaccess_oneos, sh[[ow]] route-map
oneaccess_oneos_show_track_all.textfsm, .*, oneaccess_oneos, sh[[ow]] track all
oneaccess_oneos_show_voice_mos.textfsm, .*, oneaccess_oneos, sh[[ow]] voice mos
oneaccess_oneos_show_helpers.textfsm, .*, oneaccess_oneos, sh[[ow]] helpers
oneaccess_oneos_show_ip_ssh.textfsm, .*, oneaccess_oneos, sh[[ow]] ip ssh
oneaccess_oneos_show_memory.textfsm, .*, oneaccess_oneos, sh[[ow]] memory
oneaccess_oneos_show_tacacs.textfsm, .*, oneaccess_oneos, sh[[ow]] tacacs
oneaccess_oneos_show_sntp.textfsm, .*, oneaccess_oneos, sh[[ow]] sntp
oneaccess_oneos_hostname.textfsm, .*, oneaccess_oneos, hostname
oneaccess_oneos_ls.textfsm, .*, oneaccess_oneos, ls( -[lh][lh]? )?.*
Expand Down
27 changes: 27 additions & 0 deletions ntc_templates/templates/oneaccess_oneos_show_tacacs.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Value TACACS_SERVER (.+?)
Value SERVER_PORT (\d+)
Value SOCKET_OPENS (\d+)
Value SOCKET_CLOSES (\d+)
Value SOCKET_ABORTS (\d+)
Value SOCKET_ERRORS (\d+)
Value SOCKET_TIMEOUTS (\d+)
Value FAILED_CONNECTIONS (\d+)
Value PACKETS_SENT (\d+)
Value PACKET_RECEIVED (\d+)

Start
^\s+Tacacs\+\s+Server\s+Address\s+:\s.*$$ -> Continue.Record
^\s+Tacacs\+\s+Server\s+Address\s+:\s+${TACACS_SERVER}\s*$$
^\s+Server\s+port\s+:\s+${SERVER_PORT}\s*$$
^\s+Number\sof\ssockets\sopen\s+:\s+${SOCKET_OPENS}\s*$$
^\s+Number\sof\ssockets\sclosed\s+:\s+${SOCKET_CLOSES}\s*$$
^\s+Number\sof\ssockets\saborted\s+:\s+${SOCKET_ABORTS}\s*$$
^\s+Number\sof\ssockets\serror\s+:\s+${SOCKET_ERRORS}\s*$$
^\s+Number\sof\ssockets\stimeout\s+:\s+${SOCKET_TIMEOUTS}\s*$$
^\s+Number\sof\sconnect\sfails\s+:\s+${FAILED_CONNECTIONS}\s*$$
^\s+Number\sof\spackets\ssent\s+:\s+${PACKETS_SENT}\s*$$
^\s+Number\sof\spackets\sreceived\s+:\s+${PACKET_RECEIVED}\s*$$
^\s*TACACS\+\s+SERVER\s+Statistics\s*$$
^\s*-+\s*$$
^\s*$$
^. -> Error
23 changes: 23 additions & 0 deletions ntc_templates/templates/oneaccess_oneos_show_track_all.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Value Required ID (\d+)
Value CATEGORY (\S+)
Value INTERFACE (\S+(?:\s\S+)?)
Value VRRP_ID (\d+)
Value VRF (\S+)
Value STATE (\S+)
Value STATE_CHANGES (\d+)
Value LAST_CHANGE (\S+)
Value UP_DELAY (\d+)
Value DOWN_DELAY (\d+)
Value POLL_INTERVAL (\d+)

Start
^\s*Track\s -> Continue.Record
^\s*Track\s${ID}
^\s*interface\s${INTERFACE}\s${CATEGORY}
^\s*${CATEGORY}\sId\s${VRRP_ID}(\svrf\s${VRF})
^\s*\S+\sis\s${STATE}
^\s*${STATE_CHANGES}\sChange,\sLast\sChange\s${LAST_CHANGE}
^\s*Up\sDelay\s${UP_DELAY},\sDown\sDelay\s${DOWN_DELAY}
^\s*Poll\sInterval\s\(in\smsec\)\s${POLL_INTERVAL}
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
Value Filldown PORT (\S+)
Value Required PHYSICAL_DEVICE (.*\S)
Value CONNECTOR (\S+)
Value VENDOR_NAME (.*\S)
Value VENDOR_ID (.*\S)
Value VENDOR_PARTNER (.*\S)
Value VENDOR_REVISION (.*\S)
Value VENDOR_DATECODE (.*\S)
Value TCVR_ETHER_COMPLIANCE (.*\S)
Value TCVR_10G_ETHER_COMPLIANCE (.*\S)
Value TCVR_FIBER_LINKLEN (.*\S)
Value TCVR_FIBER_TECH (.*\S)
Value TCVR_FIBER_TX_MEDIA (.*\S)
Value TCVR_FIBER_SPEED (.*\S)
Value WAVELENGTH (.*\S)
Value ENCODING (.*\S)
Value NOMINAL_BITRATE (.*\S)
Value LINKLEN_SM (.*\S)
Value LINKLEN_50_MM (.*\S)
Value LINKLEN_625_MM (.*\S)
Value LINKLEN_COPPER (.*\S)
Value List OPTIONS (\S.*\S)
Value MAX_BIT_RATE (\S.*\S)
Value MIN_BIT_RATE (\S.*\S)
Value TEMP_HIGH_ALARM (\S.*\S)
Value TEMP_LOW_ALARM (\S.*\S)
Value TEMP_HIGH_WARNING (\S.*\S)
Value TEMP_LOW_WARNING (\S.*\S)
Value VOLTAGE_HIGH_ALARM (\S.*\S)
Value VOLTAGE_LOW_ALARM (\S.*\S)
Value VOLTAGE_HIGH_WARNING (\S.*\S)
Value VOLTAGE_LOW_WARNING (\S.*\S)
Value BIAS_HIGH_ALARM (\S.*\S)
Value BIAS_LOW_ALARM (\S.*\S)
Value BIAS_HIGH_WARNING (\S.*\S)
Value BIAS_LOW_WARNING (\S.*\S)
Value TX_POWER_HIGH_ALARM (\S.*\S)
Value TX_POWER_LOW_ALARM (\S.*\S)
Value TX_POWER_HIGH_WARNING (\S.*\S)
Value TX_POWER_LOW_WARNING (\S.*\S)
Value RX_POWER_HIGH_ALARM (\S.*\S)
Value RX_POWER_LOW_ALARM (\S.*\S)
Value RX_POWER_HIGH_WARNING (\S.*\S)
Value RX_POWER_LOW_WARNING (\S.*\S)
Value MEASURED_MODULE_TEMP (\S.*\S)
Value MEASURED_SUPPLY_VOLTAGE (\S.*\S)
Value MEASURED_TX_BIAS_CURRENT (\S.*\S)
Value MEASURED_TX_OUTPUT_POWER (\S.*\S)
Value MEASURED_RX_INPUT_POWER (\S.*\S)

Start
^SFP -> Continue.Record
^SFP\s${PORT}:
^\s*No\s+(Inventory\s+data\s+available|SFP\s+module\s+present)
^\s*Physical\sdevice\s+=\s+${PHYSICAL_DEVICE}
^\s*connector\s+=\s+${CONNECTOR}
^\s*vendor: -> VENDOR
^\s*wavelength\s+=\s+${WAVELENGTH}
^\s*encoding\s+=\s+${ENCODING}
^\s*nominalBitRate\s+=\s+${NOMINAL_BITRATE}
^\s*Link\slength\sin: -> LINK_LENGTH
^\s*[mM]in\sbit\srate\s+=\s+${MIN_BIT_RATE}
^\s*Diagnostics\scalibration\sis\sinternal -> DIAGNOSTICS
^\s*SFP\s+module\s+inventory\s+information\s*:
^\s*$$
^. -> Error

VENDOR
^\s*name\s+=\s+${VENDOR_NAME}
^\s*id\s+=\s+${VENDOR_ID}
^\s*partNumber\s+=\s+${VENDOR_PARTNER}
^\s*revision\s+=\s+${VENDOR_REVISION}
^\s*dateCode\s+=\s+${VENDOR_DATECODE}
^\s*transceiver: -> TRANSCEIVER
^\s+serialNumber\s+=
^\s*$$
^. -> Error

TRANSCEIVER
^\s*ethernetComplianceCode\s+=\s+${TCVR_ETHER_COMPLIANCE}
^\s*10G\sethernetComplianceCode\s+=\s+${TCVR_10G_ETHER_COMPLIANCE}
^\s*fiberLinkLen\s+=\s+${TCVR_FIBER_LINKLEN}
^\s*fiberTech\s+=\s+${TCVR_FIBER_TECH}
^\s*fiberTxMedia\s+=\s+${TCVR_FIBER_TX_MEDIA}
^\s*fiberSpeed\s+=\s+${TCVR_FIBER_SPEED} -> Continue
^\s*fiberSpeed -> Start
^\s+sonet
^\s*$$
^. -> Error

LINK_LENGTH
^\s*single\sfiber\smode\s+=\s+${LINKLEN_SM}
^\s*50u\smulti-mode\sfiber\s+=\s+${LINKLEN_50_MM}
^\s*62\.5u\smulti-mode\sfiber\s+=\s+${LINKLEN_625_MM}
^\s*copper\scable\s+=\s+${LINKLEN_COPPER} -> Continue
^\s*copper\scable -> OPTIONS
^\s*$$
^. -> Error

OPTIONS
^\s*Max\sbit\srate\s+=\s+${MAX_BIT_RATE} -> Start
^\s*options\s+=\s${OPTIONS}
^\s+${OPTIONS}
^\s*$$
^. -> Error

DIAGNOSTICS
^\s*Temp\sHigh\sAlarm\s+=\s+${TEMP_HIGH_ALARM}
^\s*Temp\sLow\sAlarm\s+=\s+${TEMP_LOW_ALARM}
^\s*Temp\sHigh\sWarning\s+=\s+${TEMP_HIGH_WARNING}
^\s*Temp\sLow\sWarning\s+=\s+${TEMP_LOW_WARNING}
^\s*Voltage\sHigh\sAlarm\s+=\s+${VOLTAGE_HIGH_ALARM}
^\s*Voltage\sLow\sAlarm\s+=\s+${VOLTAGE_LOW_ALARM}
^\s*Voltage\sHigh\sWarning\s+=\s+${VOLTAGE_HIGH_WARNING}
^\s*Voltage\sLow\sWarning\s+=\s+${VOLTAGE_LOW_WARNING}
^\s*Bias\sHigh\sAlarm\s+=\s+${BIAS_HIGH_ALARM}
^\s*Bias\sLow\sAlarm\s+=\s+${BIAS_LOW_ALARM}
^\s*Bias\sHigh\sWarning\s+=\s+${BIAS_HIGH_WARNING}
^\s*Bias\sLow\sWarning\s+=\s+${BIAS_LOW_WARNING}
^\s*TX\sPower\sHigh\sAlarm\s+=\s+${TX_POWER_HIGH_ALARM}
^\s*TX\sPower\sLow\sAlarm\s+=\s+${TX_POWER_LOW_ALARM}
^\s*TX\sPower\sHigh\sWarning\s+=\s+${TX_POWER_HIGH_WARNING}
^\s*TX\sPower\sLow\sWarning\s+=\s+${TX_POWER_LOW_WARNING}
^\s*RX\sPower\sHigh\sAlarm\s+=\s+${RX_POWER_HIGH_ALARM}
^\s*RX\sPower\sLow\sAlarm\s+=\s+${RX_POWER_LOW_ALARM}
^\s*RX\sPower\sHigh\sWarning\s+=\s+${RX_POWER_HIGH_WARNING}
^\s*RX\sPower\sLow\sWarning\s+=\s+${RX_POWER_LOW_WARNING}
^\s*Internally\sMeasured\sModule\sTemperature\s+=\s+${MEASURED_MODULE_TEMP}
^\s*Internally\sMeasured\sSupply\sVoltage\s+=\s+${MEASURED_SUPPLY_VOLTAGE}
^\s*Internally\sMeasured\sTx\sBias\sCurrent\s+=\s+${MEASURED_TX_BIAS_CURRENT}
^\s*Measured\sTx\sOutput\sPower\s+=\s+${MEASURED_TX_OUTPUT_POWER}
^\s*Measured\sRx\sInput\sPower\s+=\s+${MEASURED_RX_INPUT_POWER}
^\s*Optional\s+Status
^\s*Alarm
^SFP -> Continue.Record
^SFP\s+${PORT}: -> Start
^\s*$$
^. -> Error
Loading

0 comments on commit 49df6f6

Please sign in to comment.