Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support DLink DS Show ARP (#1267) #1268

Merged
merged 1 commit into from
Dec 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Interfaces
^\s*${PORT}\s+is\s+${STATUS}\s+Port\s+mode\s+is\s+${FC_MODE}\s*$$ -> Record
^\s*${PORT}\s+is\s+${STATUS}\s+\(${TYPE}\)\s*$$ -> Record
^\s*${PORT}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
^\s*${PORT}\s+${NAME}\s+${STATUS}:\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
^\s*${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
^-+
^\s*$$
Expand Down
13 changes: 13 additions & 0 deletions ntc_templates/templates/dlink_ds_show_arpentry.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Value INTERFACE (\S+)
Value IP (\d+\.\d+\.\d+\.\d+)
Value MAC (\S+)
Value TYPE (\S+)

Start
^\s+ARP\s+Aging\s+Time\s+:\s+\d+
^Interface\s+IP Address\s+MAC Address\s+Type
^\-+\s+\-+\s+\-+\s+\-+$$
^Total Entries:\s+\d+
^${INTERFACE}\s+${IP}\s+${MAC}\s+${TYPE} -> Record
^\s*$$
^. -> Error
2 changes: 2 additions & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ dell_powerconnect_show_interfaces_description.textfsm, .*, dell_powerconnect, sh
dell_powerconnect_show_bridge_address_table.textfsm, .*, dell_powerconnect, sh[[ow]] br[[idge]] a[[ddress-table]]
dell_powerconnect_show_interfaces_status.textfsm, .*, dell_powerconnect, sh[[ow]] int[[erfaces]] st[[atus]]

dlink_ds_show_arpentry.textfsm, .*, dlink_ds, sh[[ow]] arpe[[ntry]]

ericsson_ipos_show_isis_adjacency.textfsm, .*, ericsson_ipos, sh[[ow]] isis adja[[cency]]
ericsson_ipos_show_version.textfsm, .*, ericsson_ipos, sh[[ow]] ver[[sion]]
ericsson_ipos_show_arp.textfsm, .*, ericsson_ipos, sh[[ow]] ar[[p]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ Gi1/0/15 Multi Space to the notconnect 16 a-half auto 10/100BaseTX
Gi1/0/16 Multi Space to the err-disabled 16 a-half auto 10/100BaseTX
Gi1/0/17 Multi Space disabled 16 a-half auto 10/100BaseTX
Gi1/0/18 Monitoring Port monitoring routed a-full auto 10/100/1000BaseT
Gi1/0/19 No Description notconnect: 1 a-full a-100 10/100/1000BaseTX
Gi1/0/20 No Description connected: 1 a-full a-100 10/100/1000BaseTX
Fa1/6 test notconnect 1 auto auto 10/100BaseTX
Po1 ethchl connected trunk a-full a-1000
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,22 @@ parsed_sample:
speed: "auto"
type: "10/100/1000BaseT"
fc_mode: ""
- port: "Gi1/0/19"
name: "No Description"
status: "notconnect"
vlan: "1"
duplex: "a-full"
speed: "a-100"
type: "10/100/1000BaseTX"
fc_mode: ""
- port: "Gi1/0/20"
name: "No Description"
status: "connected"
vlan: "1"
duplex: "a-full"
speed: "a-100"
type: "10/100/1000BaseTX"
fc_mode: ""
- port: "Fa1/6"
name: "test"
status: "notconnect"
Expand Down
10 changes: 10 additions & 0 deletions tests/dlink_ds/show_arpentry/dlink_ds_show_arpentry.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARP Aging Time : 20

Interface IP Address MAC Address Type
------------- --------------- ----------------- ---------------
System 192.168.173.0 FF-FF-FF-FF-FF-FF Local/Broadcast
System 192.168.173.1 00-01-21-01-52-96 Dynamic
System 192.168.173.2 00-AD-24-83-95-F8 Local
System 192.168.173.255 FF-FF-FF-FF-FF-FF Local/Broadcast

Total Entries: 4
18 changes: 18 additions & 0 deletions tests/dlink_ds/show_arpentry/dlink_ds_show_arpentry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
parsed_sample:
- interface: "System"
ip: "192.168.173.0"
mac: "FF-FF-FF-FF-FF-FF"
type: "Local/Broadcast"
- interface: "System"
ip: "192.168.173.1"
mac: "00-01-21-01-52-96"
type: "Dynamic"
- interface: "System"
ip: "192.168.173.2"
mac: "00-AD-24-83-95-F8"
type: "Local"
- interface: "System"
ip: "192.168.173.255"
mac: "FF-FF-FF-FF-FF-FF"
type: "Local/Broadcast"
1 change: 1 addition & 0 deletions tests/test_index_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"cisco_xr",
"dell_force10",
"dell_powerconnect",
"dlink_ds",
"enterasys",
"ericsson_ipos",
"extreme",
Expand Down