Skip to content

Commit

Permalink
Add IOS sh ip dhcp binding template (#1476)
Browse files Browse the repository at this point in the history
Co-authored-by: pskliarenko <“[email protected]”>
  • Loading branch information
PavloSkliarenko and pskliarenko authored Jul 22, 2024
1 parent 4ea77d0 commit 2ab1e65
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ntc_templates/templates/cisco_ios_show_ip_dhcp_binding.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Value IP_ADDRESS (\S+)
Value HARDWARE_ADDRESS (\S+)
Value EXPIRATION (\S+)
Value TYPE (\S+)

Start
^\s*Bindings from all pools not associated with VRF:\s*$$
^\s*IP\s+address\s+Client-ID/(?:Hardware\s+address/(?:User\s+name)?)?\s+Lease expiration\s+Type\s*$$ -> DhcpTable
^\s*$$
^. -> Error

DhcpTable
^\s*Hardware\s+address/\s*$$
^\s*User\s+name\s*$$
^\s*${IP_ADDRESS}\s+${HARDWARE_ADDRESS}\s+${EXPIRATION}\s+${TYPE}\s*$$ -> Record
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ cisco_ios_show_ip_ospf_database.textfsm, .*, cisco_ios, sh[[ow]] ip ospf data[[b
cisco_ios_show_ip_ospf_neighbor.textfsm, .*, cisco_ios, sh[[ow]] ip ospf nei[[ghbor]]
cisco_ios_show_ip_route_summary.textfsm, .*, cisco_ios, sh[[ow]] ip ro[[ute]] sum[[mary]]
cisco_ios_show_ip_access-lists.textfsm, .*, cisco_ios, sh[[ow]] ip acce[[ss-lists]]
cisco_ios_show_ip_dhcp_binding.textfsm, .*, cisco_ios, sh[[ow]] ip dh[[cp]] b[[inding]]
cisco_ios_show_mpls_interfaces.textfsm, .*, cisco_ios, sh[[ow]] mpls interfa[[ces]]
cisco_ios_show_power_available.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] a[[vailable]]
cisco_ios_show_access-session.textfsm, .*, cisco_ios, show access-s[[ession]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
10.100.88.26 01aa.aaaa.aaaa.aa Infinite Manual
10.100.88.197 01dd.dddd.dddd.dd Infinite Manual
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
parsed_sample:
- expiration: "Infinite"
hardware_address: "01aa.aaaa.aaaa.aa"
ip_address: "10.100.88.26"
type: "Manual"
- expiration: "Infinite"
hardware_address: "01dd.dddd.dddd.dd"
ip_address: "10.100.88.197"
type: "Manual"

0 comments on commit 2ab1e65

Please sign in to comment.