Skip to content

Commit

Permalink
Add Oneaccess templates (#1759)
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 9756615 commit 16724e8
Show file tree
Hide file tree
Showing 32 changed files with 788 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 @@ -745,17 +745,22 @@ oneaccess_oneos_show_voice_voip-call_any_all.textfsm, .*, oneaccess_oneos, sh[[o
oneaccess_oneos_show_cellular-radio_context.textfsm, .*, oneaccess_oneos, sh[[ow]] cell[[ular-radio]] context
oneaccess_oneos_show_cellular-radio_network.textfsm, .*, oneaccess_oneos, sh[[ow]] cell[[ular-radio]] network
oneaccess_oneos_show_ip_as-path-access-list.textfsm, .*, oneaccess_oneos, sh[[ow]] ip as-path-access-list
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
oneaccess_oneos_show_product-info-area.textfsm, .*, oneaccess_oneos, sh[[ow]] product\-info\-area
oneaccess_oneos_show_ip_access-lists.textfsm, .*, oneaccess_oneos, sh[[ow]] ip access-lists[[s]]
oneaccess_oneos_show_isdn_led-status.textfsm, .*, oneaccess_oneos, sh[[ow]] isdn led-status
oneaccess_oneos_show_isdn_status_all.textfsm, .*, oneaccess_oneos, sh[[ow]] isdn status all
oneaccess_oneos_show_reboot_counters.textfsm, .*, oneaccess_oneos, sh[[ow]] reboot counters
oneaccess_oneos_cat_bsa_bsaboot.inf.textfsm, .*, oneaccess_oneos, cat (\/|)(BSA|bsa)(\/| )bsa(B|b)oot.inf
oneaccess_oneos_show_ip_bgp_summary.textfsm, .*, oneaccess_oneos, sh[[ow]] ip bgp summary
oneaccess_oneos_show_ip_prefix-list.textfsm, .*, oneaccess_oneos, sh[[ow]] ip prefix-list
oneaccess_oneos_show_vrrp_interface.textfsm, .*, oneaccess_oneos, sh[[ow]] vrrp int[[erface]]
oneaccess_oneos_show_ip_vrf_brief.textfsm, .*, oneaccess_oneos, sh[[ow]] ip vrf brief
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_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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Value MAC ([\w:]+)
Value MOTHERBOARD (\w.*\w)
Value MANUFACTURING_DATE ([^ ]+)
Value List SERIAL ([A-Z]\d+)
Value PRODUCT_NAME (\w.+\w)
Value COMMERCIAL_NAME (\w.+\w)


Start
^\|\Wmac0\W+\|\W${MAC}\W+\|$$
^\|\WMotherboard\W[Tt]ype\W+\|\W${MOTHERBOARD}\W+\|$$
^\|\WManufacturing\W[Dd]ate\W+\|\W${MANUFACTURING_DATE}\W+\|$$
^\|\WSerial\W[Nn]umber\W+\|\W${SERIAL}\W+\|$$
^\|\WProduct\W[Nn]ame\W+\|\W${PRODUCT_NAME}\W+\|$$
^\|\WCommercial\W[Nn]ame\W+\|\W${COMMERCIAL_NAME}\W+\|$$
^\+-+(\+-+)?\+\s*$$
^\|\s+Product\s+Info\s+Area\s+\|
^\|\s+Key\s+\|\s+Value\s+\|\s*$$
^\|\s+(mac\d+|Manufacturing\s+(File\s+Reference|Location)|Mreturn\d+|(Model|PCB|HW)\s+[Rr]evision|Last\s+Testing\s+Date|Sales\s+Code|Mib-\d+\s+system\s+\S+|Software\s+compatibility\s+code|SCAid)\s+\|
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Value Required DEVICE (\S+)
Value SERIAL (\S+)
Value REBOOT_CAUSE (.*)
Value HARDWARE_RESET (\d+)
Value POWER_FAIL_DETECTION (\d+)
Value TOTAL_SOFTWARE_REBOOTS (\d+)
Value SYSTEM_DEFENSE (\d+)
Value GENERIC_SOFTWARE_REBOOT (\d+)
Value ADMIN_REQUESTED_REBOOT (\d+)
Value ADMIN_DELAYED_REBOOT (\d+)
Value SPURIOUS_POWER_FAILS (\d+)

Start
^Reboot\sstatus\sfor\sdevice\s${DEVICE}\sS\/N\s${SERIAL}
^Last\sReboot\sCause\s+:\s+${REBOOT_CAUSE}
^Reboot\sCounters
^Reboot\son\shardware\sreset\s+:\s+${HARDWARE_RESET}
^Power\sFail\sdetection\s+:\s+${POWER_FAIL_DETECTION}
^Total\sSoftware\sRequested\sReboots\s+:\s+${TOTAL_SOFTWARE_REBOOTS}
^\s*Generic\ssoftware\sreboot\srequest\s+:\s+${GENERIC_SOFTWARE_REBOOT}
^\s*System\sdefense\s-\sreboot\safter\scrash\s+:\s+${SYSTEM_DEFENSE}
^\s*Administrator\srequested\sreboot\s+:\s+${ADMIN_REQUESTED_REBOOT}
^\s*Administrator\srequested\sdelayed\sreboot\s+:\s+${ADMIN_DELAYED_REBOOT}
^Since\sstartup,\sspurious\sPower\sFail\shas\soccur+ed\s${SPURIOUS_POWER_FAILS}\stime
^\s*$$
^. -> Error
13 changes: 13 additions & 0 deletions ntc_templates/templates/oneaccess_oneos_show_route-map.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Value Required NAME (\S+)
Value Required ACTION (\S+)
Value Required SEQUENCE (\d+)
Value List MATCH_CLAUSES (.+)
Value List SET_CLAUSES (.+)

Start
^route-map\s+${NAME}\s${ACTION}\s+${SEQUENCE}\s*$$
^\s+match\s+${MATCH_CLAUSES}
^\s+set\s+${SET_CLAUSES}
^exit -> Record
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Value Filldown AAA_GROUP (\S+)
Value Required AAA_PROTOCOL (authentication|authorization|accounting)
Value AAA_COMMAND (\w+)
Value List AAA_CONFIG (.*)
Value Filldown,List AAA_SERVERS (\S+)

Start
^\s*aaa\s+group\s+server\s+tacacs\s+${AAA_GROUP}
^\s+server\s+${AAA_SERVERS}\s*$$
^\s*aaa\s+${AAA_PROTOCOL}\s+${AAA_COMMAND}\s+${AAA_CONFIG}\s*$$ -> Record
^exit
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Value Required PROTOCOL (ssh|telnet)
Value List INTERFACE (\S+.*\d+)
Value ACL (\S+)
Value List VRF (\S+)

Start
^bind\sssh\sacl\s${ACL} -> SSH
^bind\sssh\s${INTERFACE}$$ -> SSH
^bind\sssh\svrf\s${VRF} -> SSH
^bind\stelnet\sacl\s${ACL} -> TELNET
^bind\stelnet\s${INTERFACE} -> TELNET
^bind\stelnet\svrf\s${VRF} -> TELNET
^\s*$$
^. -> Error

SSH
# at EOF or new protocol, start a record
# not all entries (ACL, VRF) may be present
^bind\stelnet -> Continue.Record
^bind\stelnet\sacl\s${ACL} -> Start
^bind\stelnet\s${INTERFACE} -> Start
^bind\stelnet\svrf\s${VRF} -> Start
^bind\s${PROTOCOL}\svrf\s${VRF}
^bind\s${PROTOCOL}\s${INTERFACE}
^\s*$$
^. -> Error

TELNET
# at EOF or new protocol, start a record
# not all entries (ACL, VRF) may be present
^bind\sssh -> Continue.Record
^bind\sssh\sacl\s${ACL} -> Start
^bind\sssh\s${INTERFACE}$$ -> Start
^bind\sssh\svrf\s${VRF} -> Start
^bind\s${PROTOCOL}\svrf\s${VRF}
^bind\s${PROTOCOL}\s${INTERFACE}
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
+----------------------------------------------------------------+
| Product Info Area |
+------------------------------+---------------------------------+
| Key | Value |
+------------------------------+---------------------------------+
| mac0 | 70:FC:8C:07:22:CC |
+------------------------------+---------------------------------+
| mac1 | 70:FC:8C:0B:22:CC |
+------------------------------+---------------------------------+
| mac2 | 70:FC:8C:0F:22:CC |
+------------------------------+---------------------------------+
| mac3 | 70:FC:8C:13:22:CC |
+------------------------------+---------------------------------+
| mac4 | 70:FC:8C:17:22:CC |
+------------------------------+---------------------------------+
| mac5 | 70:FC:8C:1B:22:CC |
+------------------------------+---------------------------------+
| mac6 | 70:FC:8C:1F:22:CC |
+------------------------------+---------------------------------+
| mac7 | 70:FC:8C:23:22:CC |
+------------------------------+---------------------------------+
| Manufacturing File Reference | 1000 00 N 0046230A00 AH |
+------------------------------+---------------------------------+
| Motherboard Type | MB420SAVad0UFPE0BNW |
+------------------------------+---------------------------------+
| Manufacturing Location | TOAB |
+------------------------------+---------------------------------+
| Manufacturing Date | 18/01/2017 |
+------------------------------+---------------------------------+
| Serial Number | T1703006230033175 |
+------------------------------+---------------------------------+
| Product name | LBB_140 |
+------------------------------+---------------------------------+
| Commercial name | LBB 140 |
+------------------------------+---------------------------------+
| Mreturn1 | |
+------------------------------+---------------------------------+
| Mreturn2 | |
+------------------------------+---------------------------------+
| Mreturn3 | |
+------------------------------+---------------------------------+
| Mreturn4 | |
+------------------------------+---------------------------------+
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
parsed_sample:
- mac: "70:FC:8C:07:22:CC"
motherboard: "MB420SAVad0UFPE0BNW"
manufacturing_date: "18/01/2017"
serial:
- "T1703006230033175"
product_name: "LBB_140"
commercial_name: "LBB 140"
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
+----------------------------------------------------------------+
| Product Info Area |
+------------------------------+---------------------------------+
| Key | Value |
+------------------------------+---------------------------------+
| mac0 | 70:FC:8C:12:B5:B9 |
+------------------------------+---------------------------------+
| mac1 | 70:FC:8C:16:B5:B9 |
+------------------------------+---------------------------------+
| mac2 | 70:FC:8C:1A:B5:B9 |
+------------------------------+---------------------------------+
| mac3 | 70:FC:8C:1E:B5:B9 |
+------------------------------+---------------------------------+
| mac4 | 70:FC:8C:22:B5:B9 |
+------------------------------+---------------------------------+
| mac5 | 70:FC:8C:26:B5:B9 |
+------------------------------+---------------------------------+
| mac6 | 70:FC:8C:2A:B5:B9 |
+------------------------------+---------------------------------+
| mac7 | 70:FC:8C:2E:B5:B9 |
+------------------------------+---------------------------------+
| mac8 | 70:FC:8C:12:B5:BA |
+------------------------------+---------------------------------+
| mac9 | 70:FC:8C:16:B5:BA |
+------------------------------+---------------------------------+
| mac10 | 70:FC:8C:1A:B5:BA |
+------------------------------+---------------------------------+
| mac11 | 70:FC:8C:1E:B5:BA |
+------------------------------+---------------------------------+
| mac12 | 70:FC:8C:22:B5:BA |
+------------------------------+---------------------------------+
| mac13 | 70:FC:8C:26:B5:BA |
+------------------------------+---------------------------------+
| mac14 | 70:FC:8C:2A:B5:BA |
+------------------------------+---------------------------------+
| mac15 | 70:FC:8C:2E:B5:BA |
+------------------------------+---------------------------------+
| Model revision | 1.0 |
+------------------------------+---------------------------------+
| Manufacturing File Reference | 48554 |
+------------------------------+---------------------------------+
| Motherboard Type | MB520 AV2aF5PWnac/a |
+------------------------------+---------------------------------+
| PCB Revision | B |
+------------------------------+---------------------------------+
| HW Revision | A |
+------------------------------+---------------------------------+
| Manufacturing Location | TOAB |
+------------------------------+---------------------------------+
| Manufacturing Date | 2021-W21 |
+------------------------------+---------------------------------+
| Last Testing Date | 2021-06-07 |
+------------------------------+---------------------------------+
| Serial Number | T2121008554075089 |
+------------------------------+---------------------------------+
| Product Name | LBB_150 |
+------------------------------+---------------------------------+
| Commercial Name | LBB 150 |
+------------------------------+---------------------------------+
| Sales Code | 82131 |
+------------------------------+---------------------------------+
| Mib-2 system sysObjectID | 150 |
+------------------------------+---------------------------------+
| Software compatibility code | 0x1E |
+------------------------------+---------------------------------+
| SCAid | LBB15X |
+------------------------------+---------------------------------+
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
parsed_sample:
- mac: "70:FC:8C:12:B5:B9"
motherboard: "MB520 AV2aF5PWnac/a"
manufacturing_date: "2021-W21"
serial:
- "T2121008554075089"
product_name: "LBB_150"
commercial_name: "LBB 150"
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@


Reboot status for device LBB_154 S/N T2047008177055804

Last Reboot Cause : Software requested / System defense - reboot after crash

Reboot Counters :
Reboot on hardware reset : 0
Power Fail detection : 9
Total Software Requested Reboots : 7
System defense - reboot after crash : 6
Administrator requested delayed reboot : 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
parsed_sample:
- device: "LBB_154"
serial: "T2047008177055804"
reboot_cause: "Software requested / System defense - reboot after crash"
hardware_reset: "0"
power_fail_detection: "9"
total_software_reboots: "7"
system_defense: "6"
generic_software_reboot: ""
admin_requested_reboot: ""
admin_delayed_reboot: "1"
spurious_power_fails: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

Reboot status for device MB420SAVad0UFPE0BNW S/N T1703006230033175

Last Reboot Cause : Power Fail detection

Reboot Counters :
Reboot on hardware reset : 0
Power Fail detection : 33
Total Software Requested Reboots : 21
System defense - reboot after crash : 4
Administrator requested reboot : 15
Administrator requested delayed reboot : 2

Since startup, spurious Power Fail has occured 0 time(s)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
parsed_sample:
- device: "MB420SAVad0UFPE0BNW"
serial: "T1703006230033175"
reboot_cause: "Power Fail detection"
hardware_reset: "0"
power_fail_detection: "33"
total_software_reboots: "21"
system_defense: "4"
generic_software_reboot: ""
admin_requested_reboot: "15"
admin_delayed_reboot: "2"
spurious_power_fails: "0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

Reboot status for device PBXPLUG_103 S/N T2137008344020891

Last Reboot Cause : Generic software reboot request

Reboot Counters :
Reboot on hardware reset : 0
Power Fail detection : 7
Total Software Requested Reboots : 21
Generic software reboot request : 16
System defense - reboot after crash : 1
Administrator requested reboot : 4
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
parsed_sample:
- device: "PBXPLUG_103"
serial: "T2137008344020891"
reboot_cause: "Generic software reboot request"
hardware_reset: "0"
power_fail_detection: "7"
total_software_reboots: "21"
system_defense: "1"
generic_software_reboot: "16"
admin_requested_reboot: "4"
admin_delayed_reboot: ""
spurious_power_fails: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

Reboot status for device MBPBX30NT2BLUZ S/N T1938004830030157

Last Reboot Cause : Unknown reboot cause / Power On Reset (Power Fail or External Watchdog)

Reboot Counters :
Reboot on hardware reset : 6
Total Software Requested Reboots : 41
System defense - reboot after crash : 18
Administrator requested reboot : 16
Administrator requested delayed reboot : 7

Since startup, spurious Power Fail has occured 0 time(s)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
parsed_sample:
- device: "MBPBX30NT2BLUZ"
serial: "T1938004830030157"
reboot_cause: "Unknown reboot cause / Power On Reset (Power Fail or External Watchdog)"
hardware_reset: "6"
power_fail_detection: ""
total_software_reboots: "41"
system_defense: "18"
generic_software_reboot: ""
admin_requested_reboot: "16"
admin_delayed_reboot: "7"
spurious_power_fails: "0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

Reboot status for device PBXPLUG_401 S/N T1817008168000443

Last Reboot Cause : Generic software reboot request

Reboot Counters :
Reboot on hardware reset : 0
Power Fail detection : 6
Total Software Requested Reboots : 83
Generic software reboot request : 59
System defense - reboot after crash : 5
Administrator requested reboot : 16
Administrator requested delayed reboot : 3
Loading

0 comments on commit 16724e8

Please sign in to comment.