Skip to content
Snippets Groups Projects
Commit db89b911 authored by Cedric Caffy's avatar Cedric Caffy Committed by Michael Davis
Browse files

Resolve "HTTP REST API transition to CTA"

parent 568e2604
No related branches found
No related tags found
No related merge requests found
Showing
with 143 additions and 31 deletions
#### EOS-4-START ####
0:eos-archive-4.8.87-1.el7.cern.x86_64.rpm
0:eos-cleanup-4.8.87-1.el7.cern.x86_64.rpm
0:eos-client-4.8.87-1.el7.cern.x86_64.rpm
0:eos-fuse-4.8.87-1.el7.cern.x86_64.rpm
0:eos-fuse-core-4.8.87-1.el7.cern.x86_64.rpm
0:eos-fuse-sysv-4.8.87-1.el7.cern.x86_64.rpm
0:eos-fusex-4.8.87-1.el7.cern.x86_64.rpm
0:eos-fusex-core-4.8.87-1.el7.cern.x86_64.rpm
0:eos-fusex-selinux-4.8.87-1.el7.cern.x86_64.rpm
0:eos-ns-inspect-4.8.87-1.el7.cern.x86_64.rpm
0:eos-server-4.8.87-1.el7.cern.x86_64.rpm
0:eos-srm-4.8.87-1.el7.cern.x86_64.rpm
0:eos-test-4.8.87-1.el7.cern.x86_64.rpm
0:eos-testkeytab-4.8.87-1.el7.cern.x86_64.rpm
0:eos-archive-4.8.88-1.el7.cern.x86_64.rpm
0:eos-cleanup-4.8.88-1.el7.cern.x86_64.rpm
0:eos-client-4.8.88-1.el7.cern.x86_64.rpm
0:eos-fuse-4.8.88-1.el7.cern.x86_64.rpm
0:eos-fuse-core-4.8.88-1.el7.cern.x86_64.rpm
0:eos-fuse-sysv-4.8.88-1.el7.cern.x86_64.rpm
0:eos-fusex-4.8.88-1.el7.cern.x86_64.rpm
0:eos-fusex-core-4.8.88-1.el7.cern.x86_64.rpm
0:eos-fusex-selinux-4.8.88-1.el7.cern.x86_64.rpm
0:eos-ns-inspect-4.8.88-1.el7.cern.x86_64.rpm
0:eos-server-4.8.88-1.el7.cern.x86_64.rpm
0:eos-srm-4.8.88-1.el7.cern.x86_64.rpm
0:eos-test-4.8.88-1.el7.cern.x86_64.rpm
0:eos-testkeytab-4.8.88-1.el7.cern.x86_64.rpm
0:eos-xrootd-4.12.8-1.el7.cern.*
0:eos-xrootd-debuginfo-4.12.8-1.el7.cern.*
#### EOS-4-END ####
#### EOS-5-START ####
#0:eos-archive-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-cleanup-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-client-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-fuse-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-fuse-core-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-fuse-sysv-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-fusex-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-fusex-core-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-fusex-selinux-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-ns-inspect-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-server-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-srm-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-test-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-testkeytab-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-quarkdb-5.0.25-1.el7.cern.x86_64.rpm
#0:eos-xrootd-5.4.4-1.el7.cern.*
#0:eos-xrootd-debuginfo-5.4.4-1.el7.cern.*
#0:eos-archive-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-cleanup-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-client-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-fuse-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-fuse-core-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-fuse-sysv-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-fusex-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-fusex-core-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-fusex-selinux-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-ns-inspect-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-server-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-srm-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-test-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-testkeytab-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-quarkdb-5.0.27-1.el7.cern.x86_64.rpm
#0:eos-xrootd-5.4.6-1.el7.cern.*
#0:eos-xrootd-debuginfo-5.4.6-1.el7.cern.*
#### EOS-5-END ####
0:eos-folly-2019.11.11.00-1.el7.cern.*
0:eos-folly-deps-2019.11.11.00-1.el7.cern.*
......
#!/bin/bash
EOSINSTANCE=ctaeos
PORT=9000
json='
{
"paths":[
"/eos/ctaeos/tape/test.txt"
]
}
'
echo $json | curl -L -v --capath /etc/grid-security/certificates --cert ~/.globus/usercert.pem --cacert ~/.globus/usercert.pem --key ~/.globus/userkey.pem https://$INSTANCE:$PORT/api/v0/archiveinfo -X POST -H "Content-Type: application/json" -d @- 2> /dev/null | jq
#!/bin/bash
EOSINSTANCE=ctaeos
PORT=9000
EXPIRE=`date +%s`; let LATER=$EXPIRE+64000
token=`eos token --path /eos/ctaeos/tape/ --expires $LATER --tree --owner owner_username --group owner_group_name`
curl -k -L -v https://$EOSINSTANCE:$PORT/api/v0/archiveinfo -X POST -H "Authorization: Bearer $token" -H "Content-Type: application/json" -d '{"paths":["/eos/ctaeos/tape/test.txt","/file/does/not/exist"]}' 2> /dev/null | jq
[
{
"locality": "TAPE",
"path": "/eos/ctaeos/tape/test.txt"
},
{
"error": "USER ERROR: file does not exist or is not accessible to you",
"path": "/file/does/not/exist"
}
]
token=`eos token --path /eos/ctaeos/ --expires $LATER`
curl -k -L -v https://$EOSINSTANCE:$PORT/api/v0/archiveinfo -X POST -H "Authorization: Bearer $token" -H "Content-Type: application/json" -d '{"paths":["/eos/ctaeos/tape/test.txt","/file/does/not/exist"]}' 2> /dev/null | jq
[
{
"error": "USER ERROR: you don't have prepare permission",
"locality": "TAPE",
"path": "/eos/ctaeos/tape/test.txt"
},
{
"error": "USER ERROR: file does not exist or is not accessible to you",
"path": "/file/does/not/exist"
}
]
#!/bin/bash
EOSINSTANCE=ctaeos
PORT=9000
json='
{
"paths":[
"/eos/ctaeos/tape/test.txt"
]
}
'
echo $json | sudo curl -L -v --capath /etc/grid-security/certificates --cert ~/.globus/usercert.pem --cacert ~/.globus/usercert.pem --key ~/.globus/userkey.pem -X POST https://$EOSINSTANCE:$PORT/api/v0/release/fake_id -d @- 2>/dev/null
#!/bin/bash
# Usage: ./stage_cancellation.sh stage_request_id
EOSINSTANCE=ctaeos
PORT=9000
json='
{
"paths":[
"/eos/ctaeos/tape/test.txt"
]
}'
echo $json | sudo curl -L --capath /etc/grid-security/certificates --cert ~/.globus/usercert.pem --cacert ~/.globus/usercert.pem --key ~/.globus/userkey.pem -H 'Content-Type: application/json' -X POST https://$EOSINSTANCE:$PORT/api/v0/stage/$1/cancel --data @-
#!/bin/bash
# Usage: ./stage_deletion.sh stage_request_id
EOSINSTANCE=ctaeos
PORT=9000
sudo curl -L -v --capath /etc/grid-security/certificates --cert ~/.globus/usercert.pem --cacert ~/.globus/usercert.pem --key ~/.globus/userkey.pem -X DELETE https://$EOSINSTANCE:$PORT/api/v0/stage/$1 2> /dev/null
#!/bin/bash
EOSINSTANCE=ctaeos
PORT=9000
json='
{
"files":[
{
"path":"/eos/ctaeos/tape/test.txt"
}
]
}
'
echo $json | sudo curl -L -v --capath /etc/grid-security/certificates --cert ~/.globus/usercert.pem --cacert ~/.globus/usercert.pem --key ~/.globus/userkey.pem -X POST https://$INSTANCE:$PORT/api/v0/stage -d @- 2> /dev/null | jq
#!/bin/bash
# Usage: ./stage_tracking_example.sh stage_request_id
EOSINSTANCE=ctaeos
PORT=9000
sudo curl -L -v --capath /etc/grid-security/certificates --cert ~/.globus/usercert.pem --cacert ~/.globus/usercert.pem --key ~/.globus/userkey.pem -X GET https://$EOSINSTANCE:$PORT/api/v0/stage/$1 2> /dev/null | jq
#!/bin/bash
EOSINSTANCE=ctaeos
PORT=9000
DESTDIR=/eos/ctaeos/tape/
SOURCEFILE=file.txt
curl -k -L -v --capath /etc/grid-security/certificates --cert ~/.globus/usercert.pem --cacert ~/.globus/usercert.pem --key ~/.globus/userkey.pem https://$EOSINSTANCE:$PORT$DESTDIR --upload-file $SOURCEFILE
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment