Skip to content

Xrootd

Classes

Default

Default(protocol_attr, rse_settings, logger=logging.log)

Implementing access to RSEs using the XRootD protocol using GSI authentication.

Initializes the object with information about the referred RSE.

PARAMETER DESCRIPTION
props

Properties derived from the RSE Repository

Functions

path2pfn
path2pfn(path)

Returns a fully qualified PFN for the file referred by path.

PARAMETER DESCRIPTION
path

The path to the file.

RETURNS DESCRIPTION

Fully qualified PFN.

exists
exists(pfn)

Checks if the requested file is known by the referred RSE.

PARAMETER DESCRIPTION
pfn

Physical file name

RETURNS DESCRIPTION

True if the file exists, False if it doesn't

stat
stat(path)

Returns the stats of a file.

PARAMETER DESCRIPTION
path

path to file

RETURNS DESCRIPTION

a dict with two keys, filesize and an element of GLOBALLY_SUPPORTED_CHECKSUMS.

RAISES DESCRIPTION
ServiceUnavailable

if some generic error occurred in the library.

pfn2path
pfn2path(pfn)

Returns the path of a file given the pfn, i.e. scheme and hostname are subtracted from the pfn.

PARAMETER DESCRIPTION
path

pfn of a file

RETURNS DESCRIPTION

path.

lfns2pfns
lfns2pfns(lfns)

Returns a fully qualified PFN for the file referred by path.

PARAMETER DESCRIPTION
path

The path to the file.

RETURNS DESCRIPTION

Fully qualified PFN.

connect
connect()

Establishes the actual connection to the referred RSE.

PARAMETER DESCRIPTION
credentials

Provides information to establish a connection to the referred storage system. For S3 connections these are access_key, secretkey, host_base, host_bucket, progress_meter and skip_existing.

close
close()

Closes the connection to RSE.

get
get(pfn, dest, transfer_timeout=None)

Provides access to files stored inside connected the RSE.

PARAMETER DESCRIPTION
pfn

Physical file name of requested file

dest

Name and path of the files when stored at the client

transfer_timeout

Transfer timeout (in seconds) - dummy

DEFAULT: None

put
put(filename, target, source_dir, transfer_timeout=None)

Allows to store files inside the referred RSE.

PARAMETER DESCRIPTION
source

path to the source file on the client file system

target

path to the destination file on the storage

source_dir

Path where the to be transferred files are stored in the local file system

transfer_timeout

Transfer timeout (in seconds) - dummy

DEFAULT: None

RAISES DESCRIPTION
DestinationNotAccessible

if the destination storage was not accessible.

ServiceUnavailable

if some generic error occurred in the library.

SourceNotFound

if the source file was not found on the referred storage.

delete
delete(pfn)

Deletes a file from the connected RSE.

PARAMETER DESCRIPTION
pfn

Physical file name

RAISES DESCRIPTION
ServiceUnavailable

if some generic error occurred in the library.

SourceNotFound

if the source file was not found on the referred storage.

rename
rename(pfn, new_pfn)

Allows to rename a file stored inside the connected RSE.

PARAMETER DESCRIPTION
pfn

Current physical file name

RAISES DESCRIPTION
DestinationNotAccessible

if the destination storage was not accessible.

ServiceUnavailable

if some generic error occurred in the library.

SourceNotFound

if the source file was not found on the referred storage.

Functions