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

New Template - cisco_ios_show_object-group #850

Merged
merged 5 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
31 changes: 31 additions & 0 deletions templates/cisco_ios_show_object-group.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Value Required,Filldown OGR_TYPE (Service|Network)
pkomissarov marked this conversation as resolved.
Show resolved Hide resolved
Value Required,Filldown OGR_NAME (\S+)
Value DESCRIPTION (.+)
Value NESTED_OGR (\S+)
FragmentedPacket marked this conversation as resolved.
Show resolved Hide resolved
Value ANY (any)
Value HOST (\d+\.\d+\.\d+\.\d+)
Value HOST_RANGE_START (\d+\.\d+\.\d+\.\d+)
Value HOST_RANGE_END (\d+\.\d+\.\d+\.\d+)
Value NETWORK (\d+\.\d+\.\d+\.\d+)
Value NETMASK (\d+\.\d+\.\d+\.\d+)
Value PROTOCOL (\S+)
Value PORT_MATCH (eq|neq|range|lt|gt)
Value PORT ((?<!range\s)\S+)
Value PORT_RANGE_START ((?<=range\s)\S+)
Value PORT_RANGE_END (\S+)
Value ICMP_TYPE (echo|echo-reply|administratively-prohibited|unreachable|port-unreachable|redirect|router-advertisement|router-solicitation|packet-too-big|time-exceeded|ttl-exceeded|parameter-problem)

Start
^(Service|Network) -> Continue.Clearall
FragmentedPacket marked this conversation as resolved.
Show resolved Hide resolved
^${OGR_TYPE}\s+object\s+group\s+${OGR_NAME}\s*$$ -> Record
^\s+Description\s+${DESCRIPTION}$$ -> Record
^\s+group-object\s+${NESTED_OGR}\s*$$ -> Record
^\s+(host\s+${HOST}|range\s+${HOST_RANGE_START}\s+${HOST_RANGE_END}|${ANY}|${NETWORK}\s+${NETMASK})\s*$$ -> Record
^\s+icmp\s+${ICMP_TYPE}\s*$$ -> Record
^\s+${PROTOCOL}\s+${PORT_MATCH}\s+(${PORT_RANGE_START}\s+${PORT_RANGE_END}|${PORT})\s*$$ -> Record
^\s+${PROTOCOL}\s*$$ -> Record
^\s*$$
^.* -> Error "Could not parse line:"
pkomissarov marked this conversation as resolved.
Show resolved Hide resolved

EOF

1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ cisco_ios_show_processes_cpu.textfsm, .*, cisco_ios, sh[[ow]] proc[[esses]] [[cp
cisco_ios_show_spanning-tree.textfsm, .*, cisco_ios, sh[[ow]] sp[[anning-tree]]
cisco_ios_show_standby_brief.textfsm, .*, cisco_ios, sh[[ow]] standby(?:\s+\S+)? br[[ief]]
cisco_ios_show_ip_interface.textfsm, .*, cisco_ios, sh[[ow]] ip int[[erface]]
cisco_ios_show_object-group.textfsm, .*, cisco_ios, sh[[ow]] ob[[ject-group]]
cisco_ios_show_power_status.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] st[[atus]]
cisco_ios_show_access-list.textfsm, .*, cisco_ios, sh[[ow]] acc[[ess-list]]
cisco_ios_show_isdn_status.textfsm, .*, cisco_ios, sh[[ow]] isd[[n]] st[[atus]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Network object group NNNN
Service object group SSSS
Service object group TEST-SVC-OGR
Description ! Test Service Group !
icmp echo-reply
tcp eq smtp
udp eq tacacs
udp range tacacs 50
tcp range 79 www
tcp eq www
tcp eq 81
udp lt 999
udp gt 97
tcp-udp range 12200 12700
icmp
tcp
udp
tcp-udp range 0 65535
group-object SSSS
ip
ipinip
99
Network object group TEST_NET_OGR
Description ###TEST NETWORK OGR###
any
host 1.1.1.1
range 2.2.2.2 3.3.3.3
group-object NNNN
1.1.1.0 255.255.255.0
Network object group XXXX
Network object group YYYY
Loading