-
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.
- Loading branch information
Showing
25 changed files
with
257 additions
and
217 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
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
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,47 @@ | ||
*** Keywords *** | ||
|
||
List files in directory using gfal-utils [Arguments] ${surl} ${expectedRc}=0 ${expectedContent}=${EMPTY} | ||
${rc} ${output} Run And Return Rc And Output gfal-ls -laH ${surl} | ||
Log ${output} | ||
Should Be Equal As Integers ${rc} ${expectedRc} | ||
Should Contain ${output} ${expectedContent} | ||
[Return] ${output} | ||
|
||
Check surl exists using gfal-utils [Arguments] ${surl} | ||
${rc} ${output} Run And Return Rc And Output gfal-stat ${surl} | ||
Log ${output} | ||
Should Be Equal As Integers ${rc} 0 | ||
[Return] ${output} | ||
|
||
Check surl does not exists using gfal-utils [Arguments] ${surl} | ||
${rc} ${output} Run And Return Rc And Output gfal-stat ${surl} | ||
Log ${output} | ||
Should Be Equal As Integers ${rc} 2 | ||
Should Contain ${output} No such file or directory | ||
Should Contain ${output} SRM_INVALID_PATH | ||
[Return] ${output} | ||
|
||
Copy-out file using gfal-utils [Arguments] ${localFileName} ${surl} ${options}=${EMPTY} | ||
${rc} ${output} Run And Return Rc And Output gfal-copy -v ${options} file:///tmp/${TESTDIR}/${localFileName} ${surl} | ||
Log ${output} | ||
Run Keyword If ${rc}!=0 Fail "Exit code value is ${rc} instead of 0" | ||
[Return] ${output} | ||
|
||
Copy-in file using gfal-utils [Arguments] ${surl} ${localFileName} | ||
${rc} ${output} Run And Return Rc And Output gfal-copy -v ${surl} file:///tmp/${TESTDIR}/${localFileName} | ||
Log ${output} | ||
Run Keyword If ${rc}!=0 Fail "Exit code value is ${rc} instead of 0" | ||
[Return] ${output} | ||
|
||
Copy file using gfal-utils [Arguments] ${srcSurl} ${destSurl} ${options}=${EMPTY} | ||
${rc} ${output} Run And Return Rc And Output gfal-copy -v ${options} ${srcSurl} ${destSurl} | ||
Log ${output} | ||
Run Keyword If ${rc}!=0 Fail "Exit code value is ${rc} instead of 0" | ||
[Return] ${output} | ||
|
||
Get checksum of remote file using gfal-utils [Arguments] ${surl} ${algorithm}=adler32 | ||
${rc} ${output} Run And Return Rc And Output gfal-sum ${surl} ${algorithm} | ||
Log ${output} | ||
Should Be Equal As Integers ${rc} 0 | ||
${rest} ${last}= Split String From Right ${output} | ||
[Return] ${last} |
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
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 |
---|---|---|
@@ -1,38 +1,38 @@ | ||
*** Keywords *** | ||
|
||
Get recall requests in progress [Arguments] ${maxResults} | ||
${output} ${stderr} Curl GET http://${recallEndpoint}/recalltable/task?maxResults=${maxResults} -i -H "Token:${xmlrpcToken}" | ||
Log ${output} | ||
${output} ${rc} Curl GET http://${recallEndpoint}/recalltable/task?maxResults=${maxResults} -i -H "Token:${xmlrpcToken}" | ||
Should Be Equal As Integers ${rc} 0 | ||
[Return] ${output} | ||
|
||
Get and update to progress recall tasks ready for being taken over [Arguments] ${maxResults} | ||
${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/tasks -i -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d first=${maxResults} | ||
Log ${output} | ||
${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/tasks -i -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d first=${maxResults} | ||
Should Be Equal As Integers ${rc} 0 | ||
[Return] ${output} | ||
|
||
Update a recall task status using a groupTaskId [Arguments] ${groupTaskId} ${status} | ||
${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/task/${groupTaskId} -i -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d status=${status} | ||
Log ${output} | ||
${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/task/${groupTaskId} -i -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d status=${status} | ||
Should Be Equal As Integers ${rc} 0 | ||
[Return] ${output} | ||
|
||
Check for a completed recall task [Arguments] ${requestToken} ${fileName} | ||
${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/task -i -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d $'requestToken=${requestToken}\nsurl=srm://${srmEndpoint}/srm/managerv2?SFN=/${TAPE_SA}/${fileName}' | ||
Log ${output} | ||
${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/task -i -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d $'requestToken=${requestToken}\nsurl=srm://${srmEndpoint}/srm/managerv2?SFN=/${TAPE_SA}/${fileName}' | ||
Should Be Equal As Integers ${rc} 0 | ||
[Return] ${output} | ||
|
||
Insert new recall request [Arguments] ${absoluteFilePath} ${userId} | ||
${output} ${stderr} Curl POST http://${recallEndpoint}/recalltable/task -i -H "Content-Type:application/json" -H "Token:${xmlrpcToken}" -d '{fileName:${absoluteFilePath},userId:${userId}}' | ||
Log ${output} | ||
${output} ${rc} Curl POST http://${recallEndpoint}/recalltable/task -i -H "Content-Type:application/json" -H "Token:${xmlrpcToken}" -d '{fileName:${absoluteFilePath},userId:${userId}}' | ||
Should Be Equal As Integers ${rc} 0 | ||
[Return] ${output} | ||
|
||
Get first recall task | ||
${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/tasks -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d first=1 | ||
Log ${output} | ||
${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/tasks -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d first=1 | ||
Should Be Equal As Integers ${rc} 0 | ||
${data} = Get Line ${output} -1 | ||
Log ${data} | ||
[Return] ${data} | ||
|
||
Set success for taskid [Arguments] ${taskId} | ||
${output} ${stderr} Curl PUT http://${recallEndpoint}/recalltable/task/${taskId} -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d "status=0" | ||
Log ${output} | ||
[Return] ${output} | ||
${output} ${rc} Curl PUT http://${recallEndpoint}/recalltable/task/${taskId} -s -S -H "Content-Type:text/plain" -H "Token:${xmlrpcToken}" -d "status=0" | ||
Should Be Equal As Integers ${rc} 0 | ||
[Return] ${output} |
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
Oops, something went wrong.