Uploadclient
UploadClient(_client=None, logger=None, tracing=True)
¶
Initialises the basic settings for an UploadClient object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
_client
|
Optional[Client]
|
|
None
|
logger
|
Optional[LoggerFunction]
|
|
None
|
upload(items, summary_file_path=None, traces_copy_out=None, ignore_availability=False, activity=None)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
items
|
Iterable[FileToUploadDict]
|
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. |
required |
summary_file_path
|
Optional[str]
|
Optional: a path where a summary in form of a json file will be stored |
None
|
traces_copy_out
|
Optional[list[TraceBaseDict]]
|
reference to an external list, where the traces should be uploaded |
None
|
ignore_availability
|
bool
|
ignore the availability of a RSE |
False
|
activity
|
Optional[str]
|
the activity set to the rule if no dataset is specified |
None
|
Returns:
Type | Description |
---|---|
int
|
0 on success |
Raises:
Type | 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(rse_settings, domain)
¶
Finds the optimum protocol impl preferred by the client and supported by the remote RSE.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rse_settings
|
RSESettingsDict
|
dictionary containing the RSE settings |
required |
domain
|
str
|
The network domain, either 'wan' (default) or 'lan' |
required |
Raises:
Type | Description |
---|---|
RucioException(msg)
|
general exception with msg for more details. |