Skip to content

Commit

Permalink
Add Oneaccess templates (#1757)
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 e6a6084 commit f7dcc67
Show file tree
Hide file tree
Showing 26 changed files with 798 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -740,14 +740,19 @@ mikrotik_routeros_ping.textfsm, .*, mikrotik_routeros, [[/]]pin[[g]]
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_voice_voip-call_any_all.textfsm, .*, oneaccess_oneos, sh[[ow]] voice voip-call any all
oneaccess_oneos_show_cellular-radio_network.textfsm, .*, oneaccess_oneos, sh[[ow]] cell[[ular-radio]] network
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_ip_interface_brief.textfsm, .*, oneaccess_oneos, sh[[ow]] ip int[[erface]] brief
oneaccess_oneos_show_ip_access-lists.textfsm, .*, oneaccess_oneos, sh[[ow]] ip access-lists[[s]]
oneaccess_oneos_show_vrrp_interface.textfsm, .*, oneaccess_oneos, sh[[ow]] vrrp int[[erface]]
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_interfaces.textfsm, .*, oneaccess_oneos, sh[[ow]] interface[[s]]
oneaccess_oneos_show_helpers.textfsm, .*, oneaccess_oneos, sh[[ow]] helpers
oneaccess_oneos_show_ip_ssh.textfsm, .*, oneaccess_oneos, sh[[ow]] ip ssh
oneaccess_oneos_hostname.textfsm, .*, oneaccess_oneos, hostname
oneaccess_oneos_ls.textfsm, .*, oneaccess_oneos, ls( -[lh][lh]? )?.*

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Value Filldown,Required ROUTER_ID ([0-9a-f:\.]+)
Value Filldown LOCAL_AS (\d+(\.\d+)?)
Value Filldown VRF (\w+)
Value Filldown RIB_ENTRIES (\d+)
Value Filldown RIB_MEMORY (\d+\s\S+)
Value Filldown PEERS (\d+)
Value Filldown BGP_MEMORY (\d+\s\S+)
Value Filldown AS_PATH_ENTRIES (\d+)
Value Filldown COMMUNTIY_ENTRIES (\d+)
Value BGP_NEIGHBOR (\d+\.\d+\.\d+\.\d+)
Value ADDRESS_FAMILY (\d+)
Value NEIGHBOR_AS (\d+)
Value MESSAGE_RECEIVED (\d+)
Value MESSAGE_SENT (\d+)
Value TABLE_VERSION (\d+)
Value IN_QUEUE (\d+)
Value OUT_QUEUE (\d+)
Value UP_DOWN (\S+?)
Value STATE_PREFIX_RECEIVED (\S+\s+\S+|\S+)
Value Fillup TOTAL_NEIGHBORS (\d+)

Start
^BGP\srouter\sidentifier\s${ROUTER_ID},\slocal\sAS\snumber\s${LOCAL_AS},?\s+vrf\s\(?${VRF}\)?
^RIB\sentries\s${RIB_ENTRIES},\susing\s${RIB_MEMORY}\sof\smemory
^Peers\s${PEERS},\susing\s${BGP_MEMORY}\sof\smemory
^${AS_PATH_ENTRIES}\sBGP\sAS-PATH\sentries
^${COMMUNTIY_ENTRIES}\sBGP\scommunity\sentries
^Neighbor\s+V\s+AS\s+MsgRcvd\s+MsgSent\s+TblVer\s+InQ\s+OutQ\s+Up/Down\s+State/PfxRcd\s*$$
^${BGP_NEIGHBOR}\s+${ADDRESS_FAMILY}\s+${NEIGHBOR_AS}\s+${MESSAGE_RECEIVED}\s+${MESSAGE_SENT}\s+${TABLE_VERSION}\s+${IN_QUEUE}\s+${OUT_QUEUE}\s+${UP_DOWN}\s+${STATE_PREFIX_RECEIVED} -> Record
^Total\snumber\sof\sneighbors\s${TOTAL_NEIGHBORS}
^\s*$$
^. -> Error

EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Value INTERFACE (\S+(?:\s\S+)?)
Value IP_ADDRESS (\S+)
Value OK (YES|NO|Yes|No|yes|no)
Value STATUS (up|down|administratively down)
Value PROTOCOL (up|down)
Value DESCRIPTION (.*?)

Start
^Interface\s+IP[-\s]Address\s+OK\?\s+Status\s+Protocol\s+Description\s*$$
^${INTERFACE}\s+${IP_ADDRESS}\s+${OK}\s+${STATUS}\s+${PROTOCOL}\s+${DESCRIPTION}\s*$$ -> Record
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Value Required,Filldown PROTOCOL (\S+)
Value Required,Filldown NAME (\S+)
Value Filldown DESCRIPTION (.*)
Value Required SEQUENCE (\d+)
Value ACTION (\S+)
Value NETWORK ([0-9a-f:\.]+|any)
Value NETMASK (\d+)
Value LE (\d+)
Value GE (\d+)

Start
^${PROTOCOL}:\sip\s+prefix-list\s+${NAME}
^\s+Description:\s${DESCRIPTION}
^\s+seq\s+${SEQUENCE}\s+${ACTION}\s+${NETWORK}(/${NETMASK}|)(?:\s+ge\s+${GE}|)(?:\s+le\s+${LE}|)\s*$$ -> Record
^\s*$$
^.+ -> Error
31 changes: 31 additions & 0 deletions ntc_templates/templates/oneaccess_oneos_show_ip_ssh.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Value SSH (\S+)
Value SCP (\S+)
Value ENCRYPTION (ssh\-\S+|\S+)
Value BITS (\d+)
Value FINGERPRINT ([a-f0-9:]+)
Value MAX_SESSIONS (\d+)
Value MAX_CHANNELS_SESSION (\d+)
Value METHOD (\S+)
Value SESSION_TIMEOUT (\d+)
Value AUTH_TIMEOUT (\d+)
Value AUTH_RETRIES (\d+)

Start
^SSH\s${SSH}
^SCP\sserver\s${SCP}
^Authentication\s.ethod:?\s${METHOD}
^Authentication\stimeout\s${AUTH_TIMEOUT}\ssecs,\sretries\s${AUTH_RETRIES}
^Session\stimeout\s${SESSION_TIMEOUT}\ssecs
^Maximum\snumber\sof\ssessions\s${MAX_SESSIONS}
^Maximum\snumber\sof\schannels\sper\ssession\s${MAX_CHANNELS_SESSION}
^Authorized\s+public\s+keys:
^none
^Key\sfingerprint -> FINGERPRINT
^\s*$$
^. -> Error

FINGERPRINT
^${ENCRYPTION}\s${BITS}\s${FINGERPRINT}\s*$$ -> Start
^${BITS}\sMD5:${FINGERPRINT}.*\s\(${ENCRYPTION}\)$$ -> Start
^\s*$$
^. -> Error
12 changes: 12 additions & 0 deletions ntc_templates/templates/oneaccess_oneos_show_ip_vrf_brief.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Value VRF (\w+)
Value VRF_ID (\d+)
Value List INTERFACES ([\w\-]+\s?[\w\/\.]+)

Start
^\s*VRF\s+Name\s+VRF\s+I[Dd]\s+Interfaces\s*$$
^\s?\w+\s+\d+ -> Continue.Record
^\s?${VRF}?\s+${VRF_ID}\s+${INTERFACES}$$
^\s?${VRF}?\s+${VRF_ID}\s*$$
^\s+${INTERFACES}$$
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
BGP router identifier 194.5.12.148, local AS number 65000, vrf (null)
6 BGP AS-PATH entries
0 BGP community entries

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
194.5.163.29 4 14737 13360 12237 34 0 0 4d05h57m 28

Total number of neighbors 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
parsed_sample:
- router_id: "194.5.12.148"
local_as: "65000"
vrf: "null"
rib_entries: ""
rib_memory: ""
peers: ""
bgp_memory: ""
as_path_entries: "6"
communtiy_entries: "0"
bgp_neighbor: "194.5.163.29"
address_family: "4"
neighbor_as: "14737"
message_received: "13360"
message_sent: "12237"
table_version: "34"
in_queue: "0"
out_queue: "0"
up_down: "4d05h57m"
state_prefix_received: "28"
total_neighbors: "1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BGP router identifier 1.105.35.17, local AS number 65000 vrf default
RIB entries 1493, using 105 KiB of memory
Peers 2, using 5128 bytes of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.4.21.254 4 61400 38962 26256 78123 0 0 20:35:48 881
192.4.91.254 4 61400 38876 26260 78123 0 0 20:35:48 881

Total number of neighbors 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
parsed_sample:
- router_id: "1.105.35.17"
local_as: "65000"
vrf: "default"
rib_entries: "1493"
rib_memory: "105 KiB"
peers: "2"
bgp_memory: "5128 bytes"
as_path_entries: ""
communtiy_entries: ""
bgp_neighbor: "192.4.21.254"
address_family: "4"
neighbor_as: "61400"
message_received: "38962"
message_sent: "26256"
table_version: "78123"
in_queue: "0"
out_queue: "0"
up_down: "20:35:48"
state_prefix_received: "881"
total_neighbors: "2"
- router_id: "1.105.35.17"
local_as: "65000"
vrf: "default"
rib_entries: "1493"
rib_memory: "105 KiB"
peers: "2"
bgp_memory: "5128 bytes"
as_path_entries: ""
communtiy_entries: ""
bgp_neighbor: "192.4.91.254"
address_family: "4"
neighbor_as: "61400"
message_received: "38876"
message_sent: "26260"
table_version: "78123"
in_queue: "0"
out_queue: "0"
up_down: "20:35:48"
state_prefix_received: "881"
total_neighbors: "2"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Interface IP-Address OK? Status Protocol Description
GigabitEthernet 0/0 <unassigned> YES up up *** PBXPLUG 212 - BACKUP TEST - 94.105.1.119 ***
GigabitEthernet 0/1 <unassigned> YES up up *** PBXPLUG 401 - BACKUP TEST - 94.105.34.2 ***
GigabitEthernet 0/2 <unassigned> YES up down *IPERF*
GigabitEthernet 0/3 <unassigned> YES up down
FastEthernet 1/0 <unassigned> YES up up *** WAN INTERFACE ***
FastEthernet 1/0.1 192.168.1.2 YES up up *** management A-modem (modem ip = 192.168.1.1) ***
FastEthernet 1/0.10 <unassigned> YES up up *** VT096910 - GS20170330107 - IP-VPN - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01 - Loopback503941 ***
Dialer 1 94.105.163.30 YES up up *** VT096910 - GS20170330107 - IP-VPN - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01 - Loopback503941
Dialer 2 <unassigned> NO administratively down down *** VT108085 - GS20190640686 - CI - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01 - LOOPBACK 503899 ***
Dialer 3 94.104.254.138 YES up up *** DATA VDSL shared VLAN - GSID0004_MAIN - CI TEST - NOS-EMLP-01/ANT-EMLP-01 - LOOPBACK 500000***
Loopback 0 127.0.0.1 YES up up
Loopback 1 94.105.12.148 YES up up *** VT096910 - GS20170330107 ***
Loopback 777 94.107.245.249 YES up up
Bvi 10 192.168.10.1 YES up up *** VT108085 - GS20190640686 - CI ACCESS ***
Bvi 100 192.168.100.1 YES up up *** TEST MAARTEN - BACKUP SCRIPT PBXPLUG ***
Bvi 200 94.105.16.129 YES up down *IPERF*
dot11radio 0/0.1 <unassigned> YES up up
dot11radio 0/0.2 <unassigned> YES up up
Null 0 <unassigned> YES up up
dot11radio 0/0 <unassigned> YES up up
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
---
parsed_sample:
- interface: "GigabitEthernet 0/0"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "up"
description: "*** PBXPLUG 212 - BACKUP TEST - 94.105.1.119 ***"
- interface: "GigabitEthernet 0/1"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "up"
description: "*** PBXPLUG 401 - BACKUP TEST - 94.105.34.2 ***"
- interface: "GigabitEthernet 0/2"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "down"
description: "*IPERF*"
- interface: "GigabitEthernet 0/3"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "down"
description: ""
- interface: "FastEthernet 1/0"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "up"
description: "*** WAN INTERFACE ***"
- interface: "FastEthernet 1/0.1"
ip_address: "192.168.1.2"
ok: "YES"
status: "up"
protocol: "up"
description: "*** management A-modem (modem ip = 192.168.1.1) ***"
- interface: "FastEthernet 1/0.10"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "up"
description: "*** VT096910 - GS20170330107 - IP-VPN - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01\
\ - Loopback503941 ***"
- interface: "Dialer 1"
ip_address: "94.105.163.30"
ok: "YES"
status: "up"
protocol: "up"
description: "*** VT096910 - GS20170330107 - IP-VPN - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01\
\ - Loopback503941"
- interface: "Dialer 2"
ip_address: "<unassigned>"
ok: "NO"
status: "administratively down"
protocol: "down"
description: "*** VT108085 - GS20190640686 - CI - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01\
\ - LOOPBACK 503899 ***"
- interface: "Dialer 3"
ip_address: "94.104.254.138"
ok: "YES"
status: "up"
protocol: "up"
description: "*** DATA VDSL shared VLAN - GSID0004_MAIN - CI TEST - NOS-EMLP-01/ANT-EMLP-01\
\ - LOOPBACK 500000***"
- interface: "Loopback 0"
ip_address: "127.0.0.1"
ok: "YES"
status: "up"
protocol: "up"
description: ""
- interface: "Loopback 1"
ip_address: "94.105.12.148"
ok: "YES"
status: "up"
protocol: "up"
description: "*** VT096910 - GS20170330107 ***"
- interface: "Loopback 777"
ip_address: "94.107.245.249"
ok: "YES"
status: "up"
protocol: "up"
description: ""
- interface: "Bvi 10"
ip_address: "192.168.10.1"
ok: "YES"
status: "up"
protocol: "up"
description: "*** VT108085 - GS20190640686 - CI ACCESS ***"
- interface: "Bvi 100"
ip_address: "192.168.100.1"
ok: "YES"
status: "up"
protocol: "up"
description: "*** TEST MAARTEN - BACKUP SCRIPT PBXPLUG ***"
- interface: "Bvi 200"
ip_address: "94.105.16.129"
ok: "YES"
status: "up"
protocol: "down"
description: "*IPERF*"
- interface: "dot11radio 0/0.1"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "up"
description: ""
- interface: "dot11radio 0/0.2"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "up"
description: ""
- interface: "Null 0"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "up"
description: ""
- interface: "dot11radio 0/0"
ip_address: "<unassigned>"
ok: "YES"
status: "up"
protocol: "up"
description: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Interface IP-Address OK? Status Protocol Description
GigabitEthernet 0/0 94.107.208.169 Yes up down *** LAN INTERFACE ***
GigabitEthernet 0/1 20.20.20.1 Yes up up *** LAB_C891F - GigabitEthernet0 ***
GigabitEthernet 0/2 <unassigned> Yes up down
GigabitEthernet 0/3 10.100.1.254 Yes up up TO LBB156
GigabitEthernet 1/0 <unassigned> Yes up down *** WAN INTERFACE ***
GigabitEthernet 1/0.1 <unassigned> Yes up down
GigabitEthernet 1/0.10 <unassigned> No administratively down down
GigabitEthernet 1/0.200 <unassigned> Yes up down * VT108085 - - GS20190640686 - CORPORATE INTERNET - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01 - LOOPBACK 503899 *
GigabitEthernet 1/0.300 <unassigned> No administratively down down * VT096908 - - GS20170330105 - IP-VPN - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01 - Loopback503210 *
Bvi 300 94.107.224.226 Yes up down
Virtual-Ethernet 1 10.94.50.22 Yes up up * Mobile access 4G - UNTRUST - CORPORATE INTERNET - 4G *
Null 0 <unassigned> Yes up up Null 0
Loopback 0 <unassigned> Yes up up
Loopback 1 94.105.9.192 Yes up up
Loopback 21 192.4.21.238 Yes up up *** Mobile access 4G - BGP PEER LOOPBACK ANT ***
Loopback 91 192.4.91.238 Yes up up *** Mobile access 4G - BGP PEER LOOPBACK NOS ***
Tunnel 21 94.105.9.192 Yes up up GRE tunnel to ANT-IPSEC-02 - NO IPSEC
Tunnel 91 94.105.9.192 Yes up up GRE tunnel to NOS-IPSEC-02
Dialer 1 <unassigned> Yes up down * VT108085 - - GS20190640686 - CORPORATE INTERNET - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01 - LOOPBACK 503899 *
Dialer 3 <unassigned> No administratively down down * VT096908 - - GS20170330105 - IP-VPN - VDSL2 SHARED VLAN - NOS-EMLP-01/ANT-EMLP-01 - Loopback503210 *
Dialer 32 <unassigned> Yes up down
Loading

0 comments on commit f7dcc67

Please sign in to comment.