@@ -24,67 +24,10 @@ if [[ "${GOVC_URL:-}" == "10.2.224.4" ]]; then
24
24
JANITOR_ARGS=" --resource-type=vsphere-project-cluster-api-provider --resource-type=vsphere-project-cloud-provider --resource-type=vsphere-project-image-builder"
25
25
fi
26
26
27
-
28
27
curl " ${BOSKOS_HOST} /metric?type=gcve-vsphere-project"
29
28
30
- function initProjectUserData() {
31
- NR=" ${1} "
32
-
33
- IPS_PER_PROJECT=16
34
- # Starting at 192.168.35.0 and allowing usage up to 192.168.39.254
35
- # allows a maximum of 79 projects
36
- RANGE_START=35
37
-
38
- S2=" $(( (NR - 1 ) * IPS_PER_PROJECT )) "
39
- E2=" $(( (NR * IPS_PER_PROJECT) - 1 )) "
40
-
41
- S1=" $(( S2 / 256 )) "
42
- E1=" $(( E2 / 256 )) "
43
- S2=" $(( S2 % 256 )) "
44
- E2=" $(( E2 % 256 )) "
45
-
46
- START=" 192.168.$(( RANGE_START + S1 )) .${S2} "
47
- END=" 192.168.$(( RANGE_START + E1 )) .${E2} "
48
-
49
- resourceName=$( printf " k8s-infra-e2e-gcp-gcve-project-%03d" " ${NR} " )
50
-
51
- folder=$( printf " /Datacenter/vm/prow/k8s-infra-e2e-gcp-gcve-project-%03d" " ${NR} " )
52
- resourcePool=$( printf " /Datacenter/host/k8s-gcve-cluster/Resources/prow/k8s-infra-e2e-gcp-gcve-project-%03d" " ${NR} " )
53
- # shellcheck disable=SC2089
54
- ipPool=" {\\\" addresses\\\" :[\\\" ${START} -${END} \\\" ],\\\" gateway\\\" :\\\" 192.168.32.1\\\" ,\\\" prefix\\\" :21}"
55
-
56
- # acquire from "dirty" or "free" state
57
- curl -s -X POST " ${BOSKOS_HOST} /acquirebystate?names=${resourceName} &state=dirty&dest=busy&owner=$( whoami) " | grep -q " ${resourceName} " \
58
- || curl -s -X POST " ${BOSKOS_HOST} /acquirebystate?names=${resourceName} &state=free&dest=busy&owner=$( whoami) " | grep -q " ${resourceName} " \
59
- || echo " Failed to acquire ${resourceName} "
60
- # update
61
- # shellcheck disable=SC2089
62
- curl -s -X POST -d ' {"ipPool":"' " ${ipPool} " ' ","resourcePool":"' " ${resourcePool} " ' ","folder":"' " ${folder} " ' "}' " ${BOSKOS_HOST} /update?name=${resourceName} &state=busy&owner=$( whoami) "
63
- # release
64
- curl -s -X POST " ${BOSKOS_HOST} /release?name=${resourceName} &dest=dirty&owner=$( whoami) "
65
- }
66
-
67
- function printProjectUserData() {
68
- NR=" ${1} "
69
-
70
- resourceName=$( printf " k8s-infra-e2e-gcp-gcve-project-%03d" " ${NR} " )
71
-
72
- # acquire from "dirty" state
73
- curl -X POST " ${BOSKOS_HOST} /acquirebystate?names=${resourceName} &state=dirty&dest=busy&owner=$( whoami) " \
74
- || echo " Failed to acquire ${resourceName} "
75
- # release to free state
76
- curl -s -X POST " ${BOSKOS_HOST} /release?name=${resourceName} &dest=dirty&owner=$( whoami) "
77
- }
78
-
79
- for i in {1..40}; do
80
- initProjectUserData " ${i} "
81
- done
82
-
83
- for i in {1..40}; do
84
- printProjectUserData " ${i} "
85
- done
86
-
87
- exit 0
29
+ echo " ${GOVC_URL} "
30
+ echo " ${GOVC_USERNAME} "
88
31
89
32
# Run e2e tests
90
33
make clean-ci
0 commit comments