Rfio
RFIO protocol
Default(protocol_attr, rse_settings, logger=logging.log)
¶
Implementing access to RSEs using the RFIO protocol.
connect(credentials)
¶
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. |
path2pfn(path)
¶
Returns a fully qualified PFN for the file referred by path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
The path to the file. |
required |
Returns:
Type | Description |
---|---|
Fully qualified PFN. |
exists(path)
¶
Checks if the requested file is known by the referred RSE.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
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. |
close()
¶
Closes the connection to RSE.
put(source, target, source_dir, 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 |
required | |
transfer_timeout
|
Transfer timeout (in seconds) - dummy |
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. |
mkdir(directory)
¶
Create new directory.
split_pfn(pfn)
¶
Splits the given PFN into the parts known by the protocol. During parsing the PFN is also checked for validity on the given RSE with the given protocol.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pfn
|
a fully qualified PFN |
required |
Returns:
Type | Description |
---|---|
a dict containing all known parts of the PFN for the protocol e.g. scheme, hostname, port, prefix, path, filename |
Raises:
Type | Description |
---|---|
RSEFileNameNotSupported
|
if the provided PFN doesn't match with the protocol settings |