Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.

Commit dfe245d

Browse files
authored
[Test Script] Update readme of busybox pingtest (#609)
1 parent a78e1d4 commit dfe245d

42 files changed

Lines changed: 1426 additions & 48 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Using vpc_manager (port 9001) create a default segment table for admin purposes
4+
curl -X POST -H "Content-Type: application/json" -H "Accept: */*" "http://localhost:9001/segments/createDefaultTable"
5+
6+
# Using vpc_manager (port 9001), create a VPC
7+
# project ID: 3dda2801-d675-4688-a63f-dcda8d327f50
8+
# ID: 9192a4d4-ffff-4ece-b3f0-8d36e3d88001 (possibly network ID)
9+
curl -X POST --header "Content-Type: application/json" --header "Accept: */*" -d '{
10+
"network": {
11+
"admin_state_up": true,
12+
"revision_number": 0,
13+
"cidr": "10.0.0.0/16",
14+
"default": true,
15+
"description": "vpc",
16+
"dns_domain": "domain",
17+
"id": "9192a4d4-ffff-4ece-b3f0-8d36e3d88001",
18+
"is_default": true,
19+
"mtu": 1400,
20+
"name": "sample_vpc",
21+
"port_security_enabled": true,
22+
"project_id": "3dda2801-d675-4688-a63f-dcda8d327f50"
23+
}
24+
}' "http://localhost:9001/project/3dda2801-d675-4688-a63f-dcda8d327f50/vpcs"
25+
# Make sure to remember the cidr ID and Project ID. They will be used in creation of subnet and port.
26+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#ping node_manager (port 9007) local IP and MAC are changed to that of ACA's IP and MAC.
3+
# If running on container then log on to ACA container and check its IP and MAC and use them here.
4+
# Node ID: 1112a4d4-ffff-4ece-b3f0-8d36e3d85002
5+
curl -X POST --header "Content-Type: application/json" --header "Accept: */*" -d '{
6+
"host_info": {
7+
"local_ip": "172.31.22.156",
8+
"mac_address": "02:83:7b:8c:a9:ab",
9+
"node_id": "1112a4d4-ffff-4ece-b3f0-8d36e3d85001",
10+
"node_name": "node1",
11+
"server_port": 8080,
12+
"veth": "eth0"
13+
}
14+
}' "http://localhost:9007/nodes"
15+
16+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#ping node_manager (port 9007) local IP and MAC are changed to that of ACA's IP and MAC.
3+
# If running on container then log on to ACA container and check its IP and MAC and use them here.
4+
# Node ID: 1112a4d4-ffff-4ece-b3f0-8d36e3d85002
5+
curl -X POST --header "Content-Type: application/json" --header "Accept: */*" -d '{
6+
"host_info": {
7+
"local_ip": "172.31.31.42",
8+
"mac_address": "02:af:53:e2:70:1d",
9+
"node_id": "1112a4d4-ffff-4ece-b3f0-8d36e3d85002",
10+
"node_name": "node2",
11+
"server_port": 8080,
12+
"veth": "eth0"
13+
}
14+
}' "http://localhost:9007/nodes"
15+
16+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# Using subnet manager (9002) to create subnet
3+
# Subnet name: subnet1
4+
# Subnet ID: 8182a4d4-ffff-4ece-b3f0-8d36e3d88001
5+
curl -X POST --header "Content-Type: application/json" --header "Accept: */*" -d '{
6+
"subnet": {
7+
"cidr": "10.0.0.0/16",
8+
"id": "8182a4d4-ffff-4ece-b3f0-8d36e3d88001",
9+
"ip_version": 4,
10+
"network_id": "9192a4d4-ffff-4ece-b3f0-8d36e3d88001",
11+
"name": "subnet1",
12+
"host_routes": [
13+
{
14+
"destination": "10.0.2.0/24",
15+
"nexthop": "10.0.1.1"
16+
}
17+
]
18+
}
19+
}' "http://localhost:9002/project/3dda2801-d675-4688-a63f-dcda8d327f50/subnets"
20+
# Ensure the network ID is same as the one used in VPC
21+
# Host routes is optional
22+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
echo "No router required in this test case"
2+
echo
3+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Security Group (port 9008)
3+
4+
curl -X POST --header "Content-Type: application/json" --header "Accept: */*" -d '{
5+
"security_group": {
6+
"create_at": "string",
7+
"description": "string",
8+
"id": "3dda2801-d675-4688-a63f-dcda8d111111",
9+
"name": "sg1",
10+
"project_id": "3dda2801-d675-4688-a63f-dcda8d327f50",
11+
"security_group_rules": [
12+
],
13+
"tenant_id": "3dda2801-d675-4688-a63f-dcda8d327f50",
14+
"update_at": "string"
15+
}
16+
}' "http://localhost:9008/project/3dda2801-d675-4688-a63f-dcda8d327f50/security-groups"
17+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/bash
2+
# Using Port manager, create the end port:
3+
# Ensure your IPs are within the subnet you created (line 119)
4+
# IP, name and ID should be unique for eqach request
5+
# Ensure to use same security group ID 3dda2801-d675-4688-a63f-dcda8d111111
6+
curl -X POST --header "Content-Type: application/json" --header "Accept: */*" -d "{
7+
\"port\": {
8+
\"admin_state_up\": true,
9+
\"allowed_address_pairs\": [
10+
{
11+
\"ip_address\": \"11.11.11.1\",
12+
\"mac_address\": \"00-AA-BB-15-EB-3F\"
13+
}
14+
],
15+
\"binding:host_id\": \"node1\",
16+
\"binding:vif_details\": {},
17+
\"create_at\": \"string\",
18+
\"description\": \"string\",
19+
\"device_id\": \"8182a4d4-ffff-4ece-b3f0-8d36e3d00001\",
20+
\"device_owner\": \"compute:nova\",
21+
\"dns_assignment\": {},
22+
\"dns_domain\": \"string\",
23+
\"dns_name\": \"string\",
24+
\"extra_dhcp_opts\": [
25+
{
26+
\"ip_version\": \"string\",
27+
\"opt_name\": \"string\",
28+
\"opt_value\": \"string\"
29+
}
30+
],
31+
\"fast_path\": true,
32+
\"fixed_ips\": [
33+
{
34+
\"ip_address\": \"10.0.1.101\",
35+
\"subnet_id\": \"8182a4d4-ffff-4ece-b3f0-8d36e3d88001\"
36+
}
37+
],
38+
\"id\": \"7172a4d4-ffff-4ede-b3ml0-8d36e3d00101\",
39+
\"mac_learning_enabled\": true,
40+
\"name\": \"port101\",
41+
\"network_id\": \"9192a4d4-ffff-4ece-b3f0-8d36e3d88001\",
42+
\"network_ns\": \"string\",
43+
\"port_security_enabled\": true,
44+
\"project_id\": \"3dda2801-d675-4688-a63f-dcda8d327f50\",
45+
\"qos_network_policy_id\": \"string\",
46+
\"qos_policy_id\": \"string\",
47+
\"revision_number\": 0,
48+
\"security_groups\": [
49+
\"3dda2801-d675-4688-a63f-dcda8d111111\"
50+
],
51+
\"tags\": [
52+
\"string\"
53+
],
54+
\"tenant_id\": \"3dda2801-d675-4688-a63f-dcda8d327f50\",
55+
\"update_at\": \"string\",
56+
\"uplink_status_propagation\": true,
57+
\"veth_name\": \"string\"
58+
}
59+
}" "http://localhost:9006/project/3dda2801-d675-4688-a63f-dcda8d327f50/ports"
60+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# Using Port manager, create the end port:
3+
4+
curl -X POST --header "Content-Type: application/json" --header "Accept: */*" -d '{
5+
"port": {
6+
"device_id": "4628f3df-48ef-4d0c-9b55-167ff1f67177",
7+
"admin_state_up": true,
8+
"network_id": "9192a4d4-ffff-4ece-b3f0-8d36e3d88001",
9+
"security_groups": [
10+
"3dda2801-d675-4688-a63f-dcda8d111111"
11+
],
12+
"tenant_id": "3dda2801-d675-4688-a63f-dcda8d327f50"
13+
}
14+
}' "http://localhost:9006/project/3dda2801-d675-4688-a63f-dcda8d327f50/ports"
15+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
# Using Port manager, create the end port:
3+
4+
curl -X PUT --header "Content-Type: application/json" --header "Accept: */*" -d '{
5+
"port": {
6+
"device_id": "4628f3df-48ef-4d0c-9b55-167ff1f67177",
7+
"device_owner": "compute:nova",
8+
"binding:host_id": "node1",
9+
"fast_path": true
10+
}
11+
}' "http://localhost:9006/project/3dda2801-d675-4688-a63f-dcda8d327f50/ports/374f5359-6b94-4a50-a810-12cc70bd4438"
12+
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
# Using Port manager, create the end port:
3+
# Ensure your IPs are within the subnet you created (line 119)
4+
# IP, name and ID should be unique for eqach request
5+
# Ensure to use same security group ID 3dda2801-d675-4688-a63f-dcda8d111111
6+
curl -X POST --header "Content-Type: application/json" --header "Accept: */*" -d "{
7+
\"port\": {
8+
\"admin_state_up\": true,
9+
\"allowed_address_pairs\": [
10+
{
11+
\"ip_address\": \"11.11.11.1\",
12+
\"mac_address\": \"00-AA-BB-15-EB-3F\"
13+
}
14+
],
15+
\"binding:host_id\": \"node2\",
16+
\"binding:vif_details\": {},
17+
\"create_at\": \"string\",
18+
\"description\": \"string\",
19+
\"device_id\": \"8182a4d4-ffff-4ece-b3f0-8d36e3d00002\",
20+
\"device_owner\": \"compute:nova\",
21+
\"dns_assignment\": {},
22+
\"dns_domain\": \"string\",
23+
\"dns_name\": \"string\",
24+
\"extra_dhcp_opts\": [
25+
{
26+
\"ip_version\": \"string\",
27+
\"opt_name\": \"string\",
28+
\"opt_value\": \"string\"
29+
}
30+
],
31+
\"fast_path\": true,
32+
\"fixed_ips\": [
33+
{
34+
\"ip_address\": \"10.0.1.102\",
35+
\"subnet_id\": \"8182a4d4-ffff-4ece-b3f0-8d36e3d88001\"
36+
}
37+
],
38+
\"id\": \"7172a4d4-ffff-4ede-b3ml0-8d36e3d00102\",
39+
\"mac_learning_enabled\": true,
40+
\"name\": \"port102\",
41+
\"network_id\": \"9192a4d4-ffff-4ece-b3f0-8d36e3d88001\",
42+
\"network_ns\": \"string\",
43+
\"port_security_enabled\": true,
44+
\"project_id\": \"3dda2801-d675-4688-a63f-dcda8d327f50\",
45+
\"qos_network_policy_id\": \"string\",
46+
\"qos_policy_id\": \"string\",
47+
\"revision_number\": 0,
48+
\"security_groups\": [
49+
\"3dda2801-d675-4688-a63f-dcda8d111111\"
50+
],
51+
\"tags\": [
52+
\"string\"
53+
],
54+
\"tenant_id\": \"3dda2801-d675-4688-a63f-dcda8d327f50\",
55+
\"update_at\": \"string\",
56+
\"uplink_status_propagation\": true,
57+
\"veth_name\": \"string\"
58+
}
59+
}" "http://localhost:9006/project/3dda2801-d675-4688-a63f-dcda8d327f50/ports"

0 commit comments

Comments
 (0)