Posix
Default(protocol_attr, rse_settings, logger=logging.log)
¶
Implementing access to RSEs using the local filesystem.
exists(pfn)
¶
Checks if the requested file is known by the referred RSE.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pfn
|
Physical file name |
required |
Returns:
Type | Description |
---|---|
True if the file exists, False if it doesn't |
Raises:
Type | Description |
---|---|
SourceNotFound
|
if the source file was not found on the referred storage. |
connect()
¶
Establishes the actual connection to the referred RSE.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
credentials
|
needed to establish a connection with the storage. |
required |
Raises:
Type | Description |
---|---|
RSEAccessDenied
|
if no connection could be established. |
close()
¶
Closes the connection to RSE.
get(pfn, dest, transfer_timeout=None)
¶
Provides access to files stored inside connected the RSE.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pfn
|
Physical file name of requested file |
required | |
dest
|
Name and path of the files when stored at the client |
required |
Raises:
Type | 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(source, target, source_dir=None, transfer_timeout=None)
¶
Allows to store files inside the referred RSE.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source
|
path to the source file on the client file system |
required | |
target
|
path to the destination file on the storage |
required | |
source_dir
|
Path where the to be transferred files are stored in the local file system |
None
|
Raises:
Type | 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(pfn)
¶
Deletes a file from the connected RSE.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pfn
|
pfn to the to be deleted file |
required |
Raises:
Type | Description |
---|---|
ServiceUnavailable
|
if some generic error occurred in the library. |
SourceNotFound
|
if the source file was not found on the referred storage. |
rename(pfn, new_pfn)
¶
Allows to rename a file stored inside the connected RSE.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
path to the current file on the storage |
required | |
new_path
|
path to the new file on the storage |
required |
Raises:
Type | 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(lfns)
¶
Returns fully qualified PFNs for the file referred by each lfn in the lfns list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lfns
|
List of lfns. If lfn['path'] is present it is used as the path to the file, otherwise the path is constructed deterministically. |
required |
Returns:
Type | Description |
---|---|
Fully qualified PFNs. |
stat(pfn)
¶
Determines the file size in bytes and checksum (adler32) of the provided file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pfn
|
The PFN the file. |
required |
Returns:
Type | 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(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.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pfn
|
Physical file name of requested file |
required | |
dest
|
Name and path of the files when stored at the client |
required |
Raises:
Type | 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. |