forked from outscale/butterfly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add udp test on two butterfly
closed outscale#34 Signed-off-by: Thiery Ouattara <thiery.ouattara@outscale.com>
- Loading branch information
1 parent
3109f77
commit 7444b96
Showing
4 changed files
with
105 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,13 @@ | ||
# Description | ||
|
||
``` | ||
+-----------+ +-----------+ | ||
(vni 42) [ VM 1 ]-----| | | |-----[ VM 3 ] (vni 42) | ||
| Butterfly +======+ Butterfly | | ||
(vni 42) [ VM 2 ]-----| | | |-----[ VM 4 ] (vni 42) | ||
+-----------+ +-----------+ | ||
``` | ||
|
||
This scenario connects four virtual machines through two butterfly. | ||
Each VM are in the same network (VNI) and can send udp message. |
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,39 @@ | ||
#!/bin/bash | ||
|
||
BUTTERFLY_SRC_ROOT=$1 | ||
BUTTERFLY_BUILD_ROOT=$2 | ||
|
||
source $BUTTERFLY_SRC_ROOT/tests/functions.sh | ||
|
||
network_connect 0 1 | ||
server_start 0 | ||
server_start 1 | ||
add_nic 0 1 42 | ||
add_nic 0 2 42 | ||
add_nic 1 3 42 | ||
add_nic 1 4 42 | ||
qemu_start 1 | ||
qemu_start 2 | ||
qemu_start 3 | ||
qemu_start 4 | ||
ssh_udp 2 1 1234 | ||
ssh_udp 3 1 5554 | ||
ssh_udp 4 1 4123 | ||
ssh_udp 1 2 1234 | ||
ssh_udp 3 2 5554 | ||
ssh_udp 4 2 4123 | ||
ssh_udp 1 3 1234 | ||
ssh_udp 2 3 5554 | ||
ssh_udp 4 3 4123 | ||
ssh_udp 1 4 5004 | ||
ssh_udp 2 4 5964 | ||
ssh_udp 3 4 1004 | ||
qemu_stop 1 | ||
qemu_stop 2 | ||
qemu_stop 3 | ||
qemu_stop 4 | ||
server_stop 0 | ||
server_stop 1 | ||
network_disconnect 0 1 | ||
return_result | ||
|
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,14 @@ | ||
# Description | ||
|
||
``` | ||
+-----------+ +-----------+ | ||
(vni 42) [ VM 1 ]-----| | | |-----[ VM 3 ] (vni 1337) | ||
| Butterfly +======+ Butterfly | | ||
(vni 1337) [ VM 2 ]-----| | | |-----[ VM 4 ] (vni 42) | ||
+-----------+ +-----------+ | ||
``` | ||
|
||
This scenario connects four virtual machines through two butterfly. | ||
VM 1 & VM 4 are on the same VNI (42). | ||
VM 2 & VM 3 are on the same VNI (1337). |
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,39 @@ | ||
#!/bin/bash | ||
|
||
BUTTERFLY_SRC_ROOT=$1 | ||
BUTTERFLY_BUILD_ROOT=$2 | ||
|
||
source $BUTTERFLY_SRC_ROOT/tests/functions.sh | ||
|
||
network_connect 0 1 | ||
server_start 0 | ||
server_start 1 | ||
add_nic 0 1 42 | ||
add_nic 0 2 1337 | ||
add_nic 1 3 1337 | ||
add_nic 1 4 42 | ||
qemu_start 1 | ||
qemu_start 2 | ||
qemu_start 3 | ||
qemu_start 4 | ||
ssh_no_udp 2 1 5054 | ||
ssh_no_udp 3 1 5034 | ||
ssh_udp 4 1 5050 | ||
ssh_no_udp 1 2 5554 | ||
ssh_udp 3 2 5034 | ||
ssh_no_udp 4 2 5550 | ||
ssh_no_udp 1 3 5554 | ||
ssh_udp 2 3 5134 | ||
ssh_no_udp 4 3 5550 | ||
ssh_udp 1 4 5554 | ||
ssh_no_udp 2 4 5034 | ||
ssh_no_udp 3 4 5550 | ||
qemu_stop 1 | ||
qemu_stop 2 | ||
qemu_stop 3 | ||
qemu_stop 4 | ||
server_stop 0 | ||
server_stop 1 | ||
network_disconnect 0 1 | ||
return_result | ||
|