Uploadclient
Classes¶
UploadClient ¶
UploadClient(_client=None, logger=None, tracing=True)
Initialises the basic settings for an UploadClient object
PARAMETER | DESCRIPTION |
---|---|
_client
|
TYPE:
|
logger
|
TYPE:
|
Functions¶
upload ¶
upload(
items,
summary_file_path=None,
traces_copy_out=None,
ignore_availability=False,
activity=None,
)
PARAMETER | DESCRIPTION |
---|---|
items
|
List of dictionaries. Each dictionary describing a file to upload. Keys: path - path of the file that will be uploaded rse - rse expression/name (e.g. 'CERN-PROD_DATADISK') where to upload the file did_scope - Optional: custom did scope (Default: user.
TYPE:
|
summary_file_path
|
Optional: a path where a summary in form of a json file will be stored
TYPE:
|
traces_copy_out
|
reference to an external list, where the traces should be uploaded
TYPE:
|
ignore_availability
|
ignore the availability of a RSE
TYPE:
|
activity
|
the activity set to the rule if no dataset is specified
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
int
|
0 on success |
RAISES | DESCRIPTION |
---|---|
InputValidationError
|
if any input arguments are in a wrong format |
RSEWriteBlocked
|
if a given RSE is not available for writing |
NoFilesUploaded
|
if no files were successfully uploaded |
NotAllFilesUploaded
|
if not all files were successfully uploaded |
preferred_impl ¶
preferred_impl(rse_settings, domain)
Finds the optimum protocol impl preferred by the client and supported by the remote RSE.
PARAMETER | DESCRIPTION |
---|---|
rse_settings
|
dictionary containing the RSE settings
TYPE:
|
domain
|
The network domain, either 'wan' (default) or 'lan'
TYPE:
|
RAISES | DESCRIPTION |
---|---|
RucioException(msg)
|
general exception with msg for more details. |