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

CiscoS300 'show ip interface' template #1523

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
33 changes: 33 additions & 0 deletions ntc_templates/templates/cisco_s300_show_ip_interface.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Value IP (\S+)
Value INTERFACE (\S+(?:\s\d+)?)
Value INTERFACE_STATUS_ADMIN_OPER (\S+/\S+)
Value TYPE (Static|DHCP)
Value STATUS (\S+)

Start
^\s*Gateway\s+IP\s+Address\s+Activity\s+status\s+Type\s*$$ -> Gateway
^\s*IP\s+Address\s+I/F\s+Type\s+Status\s*$$ -> IpAddress4Column
^\s*IP\s+Address\s+I/F\s+I/F\s+Status\s+Type\s+Status\s*$$ -> IpAddress5Column
^\s*$$
^. -> Error

Gateway
^(\s*-*)*\s*$$
^\s*IP\s+Address\s+I/F\s+Type\s+Status\s*$$ -> IpAddress4Column
^\s*\S+\s+\S+\s+\S+\s*$$ -> Record
^\s*$$
^. -> Error

IpAddress4Column
^(\s*-*)*\s*$$
^\s*${IP}\s+${INTERFACE}\s+${TYPE}\s+${STATUS}\s*$$ -> Record
^\s*$$
^. -> Error

IpAddress5Column
^\s*admin/oper\s*$$
^(\s*-*)*\s*$$
^\s*Gateway\s+IP\s+Address\s+Activity\s+status\s+Type\s*$$ -> Gateway
^\s*${IP}\s+${INTERFACE}\s+${INTERFACE_STATUS_ADMIN_OPER}\s+${TYPE}\s+${STATUS}\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 @@ -382,6 +382,7 @@ cisco_nxos_show_vrf.textfsm, .*, cisco_nxos, sh[[ow]] vrf
cisco_s300_show_interfaces_status.textfsm, .*, cisco_s300, sh[[ow]] int[[erfaces]] st[[atus]]
cisco_s300_show_mac_address-table.textfsm, .*, cisco_s300, sh[[ow]] mac address-[[table]]
cisco_s300_show_lldp_neighbors.textfsm, .*, cisco_s300, sh[[ow]] lld[[p]] neig[[hbors]]
cisco_s300_show_ip_interface.textfsm, .*, cisco_s300, sh[[ow]] ip interface
cisco_s300_show_system_id.textfsm, .*, cisco_s300, sh[[ow]] system id
cisco_s300_show_version.textfsm, .*, cisco_s300, sh[[ow]] ver[[sion]]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Gateway IP Address Activity status Type
----------------------- ----------------------- --------
10.255.1.51 Active static


IP Address I/F Type Status
------------------- --------- ----------- -----------
10.255.1.72/16 vlan 255 Static Valid
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
parsed_sample:
- interface: "vlan 255"
interface_status_admin_oper: ""
ip: "10.255.1.72/16"
status: "Valid"
type: "Static"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
IP Address I/F I/F Status Type Status
admin/oper
------------------- ---------- ------------- ----------- -----------
10.0.55.6/24 vlan 355 UP/UP Static Valid


Gateway IP Address Activity status Type
----------------------- ----------------------- --------
10.0.55.1 Active static
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
parsed_sample:
- interface: "vlan 355"
interface_status_admin_oper: "UP/UP"
ip: "10.0.55.6/24"
status: "Valid"
type: "Static"
Loading