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

Fix template for Eltex's command 'show ip interface' #1810

Merged
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
6 changes: 6 additions & 0 deletions ntc_templates/templates/eltex_show_ip_interface.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Column4
^${IP}\s+${INTERFACE}\s+${TYPE}\s+${STATUS}\s*$$ -> Record
# Skip wrapped lines
^\s+received\s*$$
^\s+receiv\s*$$
^\s+ed\s*$$
^\s*$$
^. -> Error

Expand All @@ -40,6 +42,8 @@ Column6
^${IP}\s+${INTERFACE}\s+${TYPE}\s+${DIRECTED_BROADCAST}\s+${PRECEDENCE}\s+${STATUS}\s*$$ -> Record
# Skip wrapped lines
^\s+received\s*$$
^\s+receiv\s*$$
^\s+ed\s*$$
^\s*$$
^. -> Error

Expand All @@ -49,5 +53,7 @@ Column8
^${IP}\s+${INTERFACE}(?:\s+${INTERFACE_STATUS_ADMIN}/${INTERFACE_STATUS_OPER})?\s+${TYPE}\s+${DIRECTED_BROADCAST}\s+${PRECEDENCE}\s+${REDIRECT}\s+${STATUS}\s*$$ -> Record
# Skip wrapped lines
^\s+received\s*$$
^\s+receiv\s*$$
^\s+ed\s*$$
^\s*$$
^. -> Error
8 changes: 8 additions & 0 deletions tests/eltex/show_ip_interface/show_ip_interface_4.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
IP Address I/F I/F Status Type Directed Prec Redirect Status
admin/oper Broadcast
------------------ ------------- ---------- ------- --------- ---- -------- ------
0.0.0.0/32 vlan 1 UP/UP DHCP disable No enable Not
receiv
ed
10.1.2.33/24 oob UP/UP Static disable No enable Valid
10.255.1.101/16 vlan 666 UP/UP Static disable No enable Valid
38 changes: 38 additions & 0 deletions tests/eltex/show_ip_interface/show_ip_interface_4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
parsed_sample:
- directed_broadcast: "disable"
gateway_ip: ""
gateway_status: ""
gateway_type: ""
interface: "vlan 1"
interface_status_admin: "UP"
interface_status_oper: "UP"
ip: "0.0.0.0/32"
precedence: "No"
redirect: "enable"
status: "Not"
type: "DHCP"
- directed_broadcast: "disable"
gateway_ip: ""
gateway_status: ""
gateway_type: ""
interface: "oob"
interface_status_admin: "UP"
interface_status_oper: "UP"
ip: "10.1.2.33/24"
precedence: "No"
redirect: "enable"
status: "Valid"
type: "Static"
- directed_broadcast: "disable"
gateway_ip: ""
gateway_status: ""
gateway_type: ""
interface: "vlan 666"
interface_status_admin: "UP"
interface_status_oper: "UP"
ip: "10.255.1.101/16"
precedence: "No"
redirect: "enable"
status: "Valid"
type: "Static"
Loading