Skip to content

Posix

Classes

Default

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

Implementing access to RSEs using the local filesystem.

Functions

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

RAISES DESCRIPTION
SourceNotFound

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

connect
connect()

Establishes the actual connection to the referred RSE.

PARAMETER DESCRIPTION
credentials

needed to establish a connection with the storage.

RAISES DESCRIPTION
RSEAccessDenied

if no connection could be established.

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

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.

put
put(source, target, source_dir=None, 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

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

pfn to the to be deleted file

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
path

path to the current file on the storage

new_path

path to the new file on the storage

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.

lfns2pfns
lfns2pfns(lfns)

Returns fully qualified PFNs for the file referred by each lfn in the lfns list.

PARAMETER DESCRIPTION
lfns

List of lfns. If lfn['path'] is present it is used as the path to the file, otherwise the path is constructed deterministically.

RETURNS DESCRIPTION

Fully qualified PFNs.

stat
stat(pfn)

Determines the file size in bytes and checksum (adler32) of the provided file.

PARAMETER DESCRIPTION
pfn

The PFN the file.

RETURNS DESCRIPTION

a dict containing the keys filesize and adler32.

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

Implementing access to RSEs using the local filesystem, creating a symlink on a get

get
get(pfn, dest, transfer_timeout=None)

Provides access to files stored inside connected the RSE. A download/get will create a symlink on the local file system pointing to the underlying file. Other operations act directly on the remote file.

PARAMETER DESCRIPTION
pfn

Physical file name of requested file

dest

Name and path of the files when stored at the client

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