Skip to content

Commit

Permalink
New Template: hp_comware_display_ip_interface (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliddjur authored Mar 8, 2020
1 parent 5b50d31 commit 17728c6
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 0 deletions.
42 changes: 42 additions & 0 deletions templates/hp_comware_display_ip_interface.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Value INTF (\S+)
Value LINE_STATUS (UP|DOWN|Administratively DOWN)
Value PROTOCOL_STATUS (UP(\(spoofing\))?|DOWN)
Value List IPADDR (\S+)
Value MTU (\d+)


Start
^${INTF}\s+current\s+state:\s+${LINE_STATUS} -> Interface
^. -> Error


Interface
^\S+\s+current\s+state -> Continue.Record
^${INTF}\s+current\s+state:\s+${LINE_STATUS}
^Line\s+protocol\s+current\s+state:\s+${PROTOCOL_STATUS}
^Internet\s+Address\s+is\s+${IPADDR}\s+Primary
^Internet\s+Address\s+is\s+${IPADDR}\s+Sub
^Broadcast\s+address:\s\S+
^The\s+Maximum\s+Transmit\s+Unit:\s+${MTU}\s+bytes
^input\spackets\s:\s\d+,\sbytes\s:\s\d+,\smulticasts\s:\s\d+
^output\spackets\s:\s\d+,\sbytes\s:\s\d+,\smulticasts\s:\s\d+
^TTL\sinvalid\spacket\snumber:\s+\d+
^ICMP\spacket\sinput\snumber:\s+\d+
^\s+Echo\sreply:\s+\d+
^\s+Unreachable:\s+\d+
^\s+Source\squench:\s+\d+
^\s+Routing\sredirect:\s+\d+
^\s+Echo\srequest:\s+\d+
^\s+Router\sadvert:\s+\d+
^\s+Router\ssolicit:\s+\d+
^\s+Time\sexceed:\s+\d+
^\s+IP\sheader\sbad:\s+\d+
^\s+Timestamp\srequest:\s+\d+
^\s+Timestamp\sreply:\s+\d+
^\s+Information\srequest:\s+\d+
^\s+Information\sreply:\s+\d+
^\s+Netmask\srequest:\s+\d+
^\s+Netmask\sreply:\s+\d+
^\s+Unknown\stype:\s+\d+
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ fortinet_fortios_get_system_interface.textfsm, .*, fortinet_fortios, [[g]]et [[s
fortinet_fortios_get_system_status.textfsm, .*, fortinet_fortios, [[g]]et [[s]]ystem [[s]]tatus

hp_comware_display_counters_bound_interface.textfsm, .*, hp_comware, di[[splay]] cou[[nters]] (\S+) i[[nterface]]
hp_comware_display_ip_interface.textfsm, .*, hp_comware, dis[[play]] ip i[[nterface]]
hp_comware_display_mac-address.textfsm, .*, hp_comware, di[[splay]] mac-ad[[dress]]
hp_comware_display_vlan_brief.textfsm, .*, hp_comware, di[[splay]] v[[lan]] b[[rief]]
hp_comware_display_clock.textfsm, .*, hp_comware, di[[splay]] clo[[ck]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
LoopBack0 current state: UP
Line protocol current state: UP(spoofing)
Internet Address is 172.18.255.63/32 Primary
Broadcast address: 172.18.255.63
The Maximum Transmit Unit: 1536 bytes
input packets : 0, bytes : 0, multicasts : 0
output packets : 0, bytes : 0, multicasts : 0
TTL invalid packet number: 0
ICMP packet input number: 0
Echo reply: 0
Unreachable: 0
Source quench: 0
Routing redirect: 0
Echo request: 0
Router advert: 0
Router solicit: 0
Time exceed: 0
IP header bad: 0
Timestamp request: 0
Timestamp reply: 0
Information request: 0
Information reply: 0
Netmask request: 0
Netmask reply: 0
Unknown type: 0

M-GigabitEthernet0/0/0 current state: Administratively DOWN
Line protocol current state: DOWN

Vlan-interface66 current state: UP
Line protocol current state: UP
Internet Address is 172.18.69.101/24 Primary
Broadcast address: 172.18.69.255
The Maximum Transmit Unit: 1500 bytes
input packets : 65515804, bytes : 1239151236, multicasts : 2635390
output packets : 67811020, bytes : 1077354863, multicasts : 6419331
TTL invalid packet number: 0
ICMP packet input number: 1792875
Echo reply: 5
Unreachable: 275831
Source quench: 0
Routing redirect: 0
Echo request: 1517039
Router advert: 0
Router solicit: 0
Time exceed: 0
IP header bad: 0
Timestamp request: 0
Timestamp reply: 0
Information request: 0
Information reply: 0
Netmask request: 0
Netmask reply: 0
Unknown type: 0

Vlan-interface89 current state: UP
Line protocol current state: UP
Internet Address is 172.18.89.3/24 Primary
Broadcast address: 172.18.89.255
The Maximum Transmit Unit: 1500 bytes
input packets : 4039131, bytes : 161730660, multicasts : 3837772
output packets : 26662892, bytes : 958605776, multicasts : 26461590
TTL invalid packet number: 0
ICMP packet input number: 0
Echo reply: 0
Unreachable: 0
Source quench: 0
Routing redirect: 0
Echo request: 0
Router advert: 0
Router solicit: 0
Time exceed: 0
IP header bad: 0
Timestamp request: 0
Timestamp reply: 0
Information request: 0
Information reply: 0
Netmask request: 0
Netmask reply: 0
Unknown type: 0

Vlan-interface206 current state: UP
Line protocol current state: UP
Internet Address is 172.18.41.22/24 Primary
Broadcast address: 172.18.41.255
The Maximum Transmit Unit: 1500 bytes
input packets : 119165288, bytes : 674934354, multicasts : 115953989
output packets : 54858945, bytes : 3307003635, multicasts : 51601052
TTL invalid packet number: 3
ICMP packet input number: 2744265
Echo reply: 50
Unreachable: 17
Source quench: 0
Routing redirect: 0
Echo request: 2744198
Router advert: 0
Router solicit: 0
Time exceed: 0
IP header bad: 0
Timestamp request: 0
Timestamp reply: 0
Information request: 0
Information reply: 0
Netmask request: 0
Netmask reply: 0
Unknown type: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
parsed_sample:
- intf: "LoopBack0"
ipaddr:
- "172.18.255.63/32"
mtu: "1536"
line_status: "UP"
protocol_status: "UP(spoofing)"
- intf: "M-GigabitEthernet0/0/0"
ipaddr: []
mtu: ''
line_status: "Administratively DOWN"
protocol_status: "DOWN"
- intf: "Vlan-interface66"
ipaddr:
- "172.18.69.101/24"
mtu: "1500"
line_status: "UP"
protocol_status: "UP"
- intf: "Vlan-interface89"
ipaddr:
- "172.18.89.3/24"
mtu: "1500"
line_status: "UP"
protocol_status: "UP"
- intf: "Vlan-interface206"
ipaddr:
- "172.18.41.22/24"
mtu: "1500"
line_status: "UP"
protocol_status: "UP"

0 comments on commit 17728c6

Please sign in to comment.