Skip to content

Commit 9489f63

Browse files
author
ading007
authored
Fixed that the nimbus-testbeddeploy commands is not working (#8673)
1 parent 6c70cfe commit 9489f63

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

tests/resources/Nimbus-Util.robot

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ${NIMBUS_LOCATION_FULL} NIMBUS_LOCATION=${NIMBUS_LOCATION}
2525
*** Keywords ***
2626
Fetch IP
2727
[Arguments] ${name}
28-
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-ctl ip %{NIMBUS_PERSONAL_USER}-${name} | grep %{NIMBUS_PERSONAL_USER}-${name}
28+
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-ctl ip %{NIMBUS_PERSONAL_USER}-${name} | grep %{NIMBUS_PERSONAL_USER}-${name}
2929
Should Not Be Empty ${out}
3030
${len}= Get Line Count ${out}
3131
Should Be Equal As Integers ${len} 1
@@ -39,7 +39,7 @@ Get IP
3939

4040
Fetch POD
4141
[Arguments] ${name}
42-
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-ctl list | grep ${name} | awk '{print $1}' | uniq | head -1
42+
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-ctl list | grep ${name} | awk '{print $1}' | uniq | head -1
4343
Should Not Be Empty ${out}
4444
${len}= Get Line Count ${out}
4545
Should Be Equal As Integers ${len} 1
@@ -54,7 +54,7 @@ Deploy Nimbus ESXi Server
5454
Wait Until Keyword Succeeds 2 min 30 sec Login ${user} ${password}
5555

5656
:FOR ${IDX} IN RANGE 1 5
57-
\ ${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-esxdeploy ${name} --disk=48000000 --ssd=24000000 --memory=8192 --lease=0.25 --nics 2 ${version}
57+
\ ${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-esxdeploy ${name} ‐‐resultsDir %{RESULTS_DIR} --disk=48000000 --ssd=24000000 --memory=8192 --lease=0.25 --nics 2 ${version}
5858
\ Log ${out}
5959
\ # Make sure the deploy actually worked
6060
\ ${status}= Run Keyword And Return Status Should Contain ${out} To manage this VM use
@@ -144,7 +144,7 @@ Deploy Nimbus vCenter Server
144144
Wait Until Keyword Succeeds 2 min 30 sec Login ${user} ${password}
145145

146146
:FOR ${IDX} IN RANGE 1 5
147-
\ ${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-vcvadeploy --lease=0.25 --vcvaBuild ${version} ${name}
147+
\ ${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-vcvadeploy ‐‐resultsDir %{RESULTS_DIR} --lease=0.25 --vcvaBuild ${version} ${name}
148148
\ Log ${out}
149149
\ # Make sure the deploy actually worked
150150
\ ${status}= Run Keyword And Return Status Should Contain ${out} Overall Status: Succeeded
@@ -171,7 +171,7 @@ Deploy Nimbus ESXi Server Async
171171
[Tags] secret
172172
[Arguments] ${name} ${version}=${ESX_VERSION}
173173
Log To Console \nDeploying Nimbus ESXi server: ${name}
174-
${out}= Run Secret SSHPASS command %{NIMBUS_USER} '%{NIMBUS_PASSWORD}' '${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-esxdeploy ${name} --disk\=48000000 --ssd\=24000000 --memory\=8192 --lease=0.25 --nics 2 ${version}'
174+
${out}= Run Secret SSHPASS command %{NIMBUS_USER} '%{NIMBUS_PASSWORD}' '${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-esxdeploy ${name} ‐‐resultsDir %{RESULTS_DIR} --disk\=48000000 --ssd\=24000000 --memory\=8192 --lease=0.25 --nics 2 ${version}'
175175
[Return] ${out}
176176

177177
Run Secret SSHPASS command
@@ -186,7 +186,7 @@ Deploy Nimbus vCenter Server Async
186186
[Arguments] ${name} ${version}=${VC_VERSION}
187187
Log To Console \nDeploying Nimbus VC server: ${name}
188188

189-
${out}= Run Secret SSHPASS command %{NIMBUS_USER} '%{NIMBUS_PASSWORD}' '${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-vcvadeploy --lease=0.25 --vcvaBuild ${version} ${name}'
189+
${out}= Run Secret SSHPASS command %{NIMBUS_USER} '%{NIMBUS_PASSWORD}' '${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-vcvadeploy ‐‐resultsDir %{RESULTS_DIR} --lease=0.25 --vcvaBuild ${version} ${name}'
190190
[Return] ${out}
191191

192192
# Deploys a nimbus testbed based on the specified testbed spec and options
@@ -200,22 +200,22 @@ Deploy Nimbus Testbed
200200
[Arguments] ${user}=%{NIMBUS_USER} ${password}=%{NIMBUS_PASSWORD} ${spec}=${EMPTY} ${args}=${EMPTY}
201201

202202
Run Keyword And Ignore Error Cleanup Nimbus Folders deletePXE=${true}
203-
${suffix}= Generate Random String 5
204-
${specarg}= Set Variable If '${spec}' == '${EMPTY}' ${EMPTY} --testbedSpecRubyFile ./%{BUILD_TAG}/testbeds/${spec}-${suffix}
203+
${prefix}= Generate Random String 5
204+
${specarg}= Set Variable If '${spec}' == '${EMPTY}' ${EMPTY} --testbedSpecRubyFile ./%{BUILD_TAG}/testbeds/${prefix}-${spec}
205205

206206
Open Connection %{NIMBUS_GW}
207207
Wait Until Keyword Succeeds 2 min 30 sec Login ${user} ${password}
208208

209209
:FOR ${IDX} IN RANGE 1 5
210210
\ Exit For Loop If '${spec}' == '${EMPTY}'
211-
\ ${status}= Run Keyword And Return Status Put File tests/resources/nimbus-testbeds/${spec} destination=./%{BUILD_TAG}/testbeds/${spec}-${suffix}
211+
\ ${status}= Run Keyword And Return Status Put File tests/resources/nimbus-testbeds/${spec} destination=./%{BUILD_TAG}/testbeds/${prefix}-${spec}
212212
\ Log ${status}
213213
\ Sleep 3
214-
\ ${status}= Run Keyword And Return Status SSHLibrary.File Should Exist ./%{BUILD_TAG}/testbeds/${spec}-${suffix}
214+
\ ${status}= Run Keyword And Return Status SSHLibrary.File Should Exist ./%{BUILD_TAG}/testbeds/${prefix}-${spec}
215215
\ Log ${status}
216216
\ Run Keyword If ${status}== False Continue For Loop
217217
\ Sleep 3
218-
\ ${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-testbeddeploy --lease 0.25 ${specarg} ${args}
218+
\ ${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-testbeddeploy --lease 0.25 --resultsDir %{RESULTS_DIR} ${specarg} ${args}
219219
\ Log ${out}
220220
\ # Make sure the deploy actually worked
221221
\ ${status}= Run Keyword And Return Status Should Contain ${out} END TESTBED DEPLOYMENT
@@ -225,23 +225,23 @@ Deploy Nimbus Testbed
225225

226226
:FOR ${IDX} IN RANGE 1 5
227227
\ Exit For Loop If '${spec}' != '${EMPTY}'
228-
\ ${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-testbeddeploy --lease 0.25 ${specarg} ${args}
228+
\ ${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-testbeddeploy --lease 0.25 --resultsDir %{RESULTS_DIR} ${specarg} ${args}
229229
\ Log ${out}
230230
\ # Make sure the deploy actually worked
231231
\ ${status}= Run Keyword And Return Status Should Contain ${out} END TESTBED DEPLOYMENT
232232
\ Return From Keyword If ${status} ${out}
233233
\ Log To Console Nimbus deployment ${IDX} failed, trying again in 1 minute
234234
\ Sleep 1 minutes
235235

236-
Run Keyword Unless '${spec}' == '${EMPTY}' Execute Command rm -rf ./%{BUILD_TAG}/testbeds/${spec}-${suffix}
236+
Run Keyword Unless '${spec}' == '${EMPTY}' Execute Command rm -rf ./%{BUILD_TAG}/testbeds/${prefix}-${spec}
237237

238238
Fail Deploy Nimbus Testbed Failed 5 times over the course of more than 5 minutes
239239

240240
Kill Nimbus Server
241241
[Arguments] ${user} ${password} ${name}
242242
Open Connection %{NIMBUS_GW}
243243
Wait Until Keyword Succeeds 2 min 30 sec Login ${user} ${password}
244-
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-ctl kill ${name}
244+
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-ctl kill ${name}
245245
Log ${out}
246246
Close connection
247247

@@ -274,7 +274,7 @@ Nimbus Pod Cleanup
274274
[Arguments] ${nimbus_pod_name} ${testbedname}
275275
Open Connection %{NIMBUS_GW}
276276
Wait Until Keyword Succeeds 10 min 30 sec Login %{NIMBUS_USER} %{NIMBUS_PASSWORD}
277-
Execute Command USER=%{NIMBUS_PERSONAL_USER} NIMBUS=${nimbus_pod_name} nimbus-ctl --nimbusLocation=${NIMBUS_LOCATION} --testbed kill ${testbedname}
277+
Execute Command USER=%{NIMBUS_PERSONAL_USER} NIMBUS=${nimbus_pod_name} %{NIMBUS_CLI_PATH}/nimbus-ctl --nimbusLocation=${NIMBUS_LOCATION} --testbed kill ${testbedname}
278278
Close Connection
279279
Run Keyword And Ignore Error Cleanup Nimbus Folders deletePXE=${True}
280280

@@ -522,7 +522,7 @@ Deploy Nimbus NFS Datastore
522522
Open Connection %{NIMBUS_GW}
523523
Wait Until Keyword Succeeds 2 min 30 sec Login ${user} ${password}
524524

525-
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-nfsdeploy ${name} ${additional-args}
525+
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-nfsdeploy ${name} ‐‐resultsDir %{RESULTS_DIR} ${additional-args}
526526
Log ${out}
527527
# Make sure the deploy actually worked
528528
Should Contain ${out} To manage this VM use
@@ -607,7 +607,7 @@ Create Static IP Worker
607607
Log To Console Create a new static ip address worker...
608608
${name}= Evaluate 'static-worker-' + str(random.randint(1000,9999)) + str(time.clock()) modules=random,time
609609
Log To Console \nDeploying static ip worker: ${name}
610-
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-ctl --silentObjectNotFoundError kill '%{NIMBUS_PERSONAL_USER}-static-worker' && ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} nimbus-worker-deploy --nimbus ${NIMBUS_POD} --enableStaticIpService ${name}
610+
${out}= Execute Command ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-ctl --silentObjectNotFoundError kill '%{NIMBUS_PERSONAL_USER}-static-worker' && ${NIMBUS_LOCATION_FULL} USER=%{NIMBUS_PERSONAL_USER} %{NIMBUS_CLI_PATH}/nimbus-worker-deploy --nimbus ${NIMBUS_POD} --enableStaticIpService ${name}
611611
Should Contain ${out} "deploy_status": "success"
612612

613613
${pod}= Fetch POD ${name}

0 commit comments

Comments
 (0)