-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NX-OS ping implementation using more shared common code (#642)
- Loading branch information
Showing
11 changed files
with
253 additions
and
1 deletion.
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
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
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
32 changes: 32 additions & 0 deletions
32
test/nxos/mocked_data/test_ping/normal/expected_result.json
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,32 @@ | ||
{ | ||
"success": { | ||
"rtt_stddev": 0, | ||
"rtt_min": 18.104, | ||
"results": [ | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.411 | ||
}, | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.189 | ||
}, | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.13 | ||
}, | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.16 | ||
}, | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.104 | ||
} | ||
], | ||
"rtt_max": 18.411, | ||
"packet_loss": 0, | ||
"rtt_avg": 18.198, | ||
"probes_sent": 5 | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
test/nxos/mocked_data/test_ping/normal/ping_8.8.8.8_timeout_2_packet-size_100_count_5.json
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,10 @@ | ||
PING 8.8.8.8 (8.8.8.8): 100 data bytes | ||
108 bytes from 8.8.8.8: icmp_seq=0 ttl=57 time=18.411 ms | ||
108 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=18.189 ms | ||
108 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=18.13 ms | ||
108 bytes from 8.8.8.8: icmp_seq=3 ttl=57 time=18.16 ms | ||
108 bytes from 8.8.8.8: icmp_seq=4 ttl=57 time=18.104 ms | ||
|
||
--- 8.8.8.8 ping statistics --- | ||
5 packets transmitted, 5 packets received, 0.00% packet loss | ||
round-trip min/avg/max = 18.104/18.198/18.411 ms |
11 changes: 11 additions & 0 deletions
11
test/nxos/mocked_data/test_ping/ping_timed_out/expected_result.json
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,11 @@ | ||
{ | ||
"success": { | ||
"rtt_stddev": 0.0, | ||
"rtt_min": 0.0, | ||
"results": [], | ||
"rtt_max": 0.0, | ||
"packet_loss": 5, | ||
"rtt_avg": 0.0, | ||
"probes_sent": 5 | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
.../mocked_data/test_ping/ping_timed_out/ping_8.8.8.8_timeout_2_packet-size_100_count_5.json
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,9 @@ | ||
PING 8.8.8.8 (8.8.8.8): 100 data bytes | ||
Request 0 timed out | ||
Request 1 timed out | ||
Request 2 timed out | ||
Request 3 timed out | ||
Request 4 timed out | ||
|
||
--- 8.8.8.8 ping statistics --- | ||
5 packets transmitted, 0 packets received, 100.00% packet loss |
11 changes: 11 additions & 0 deletions
11
test/nxos/mocked_data/test_ping/ping_unreachable/expected_result.json
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,11 @@ | ||
{ | ||
"success": { | ||
"rtt_stddev": 0.0, | ||
"rtt_min": 0.0, | ||
"results": [], | ||
"rtt_max": 0.0, | ||
"packet_loss": 5, | ||
"rtt_avg": 0.0, | ||
"probes_sent": 5 | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...ocked_data/test_ping/ping_unreachable/ping_8.8.8.8_timeout_2_packet-size_100_count_5.json
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,16 @@ | ||
5 packets transmitted, 0 packets received, 100.00% packet loss | ||
|
||
PING 8.8.8.8 (8.8.8.8): 100 data bytes | ||
36 bytes from 10.150.102.3: Destination Host Unreachable | ||
Request 0 timed out | ||
36 bytes from 10.150.102.3: Destination Host Unreachable | ||
Request 1 timed out | ||
36 bytes from 10.150.102.3: Destination Host Unreachable | ||
Request 2 timed out | ||
36 bytes from 10.150.102.3: Destination Host Unreachable | ||
Request 3 timed out | ||
36 bytes from 10.150.102.3: Destination Host Unreachable | ||
Request 4 timed out | ||
|
||
--- 8.8.8.8 ping statistics --- | ||
5 packets transmitted, 0 packets received, 100.00% packet loss |
32 changes: 32 additions & 0 deletions
32
test/nxos_ssh/mocked_data/test_ping/normal/expected_result.json
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,32 @@ | ||
{ | ||
"success": { | ||
"rtt_stddev": 0, | ||
"rtt_min": 18.104, | ||
"results": [ | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.411 | ||
}, | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.189 | ||
}, | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.13 | ||
}, | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.16 | ||
}, | ||
{ | ||
"ip_address": "8.8.8.8", | ||
"rtt": 18.104 | ||
} | ||
], | ||
"rtt_max": 18.411, | ||
"packet_loss": 0, | ||
"rtt_avg": 18.198, | ||
"probes_sent": 5 | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
.../nxos_ssh/mocked_data/test_ping/normal/ping_8_8_8_8_timeout_2_packet_size_100_count_5.txt
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,10 @@ | ||
PING 8.8.8.8 (8.8.8.8): 100 data bytes | ||
108 bytes from 8.8.8.8: icmp_seq=0 ttl=57 time=18.411 ms | ||
108 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=18.189 ms | ||
108 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=18.13 ms | ||
108 bytes from 8.8.8.8: icmp_seq=3 ttl=57 time=18.16 ms | ||
108 bytes from 8.8.8.8: icmp_seq=4 ttl=57 time=18.104 ms | ||
|
||
--- 8.8.8.8 ping statistics --- | ||
5 packets transmitted, 5 packets received, 0.00% packet loss | ||
round-trip min/avg/max = 18.104/18.198/18.411 ms |