-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Template: hp_comware_display_ip_interface (#609)
- Loading branch information
Showing
4 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
tests/hp_comware/display_ip_interface/hp_comware_display_ip_interface.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
31 changes: 31 additions & 0 deletions
31
tests/hp_comware/display_ip_interface/hp_comware_display_ip_interface.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |