aiida.orm.nodes.data.remote package#
Module with data plugins that represent remote resources and so effectively are symbolic links.
Subpackages#
Submodules#
Data plugin that models a folder on a remote computer.
- class aiida.orm.nodes.data.remote.base.RemoteData(remote_path=None, **kwargs)[source]#
Bases:
aiida.orm.nodes.data.data.DataStore a link to a file or folder on a remote machine.
Remember to pass a computer!
- KEY_EXTRA_CLEANED = 'cleaned'#
- __abstractmethods__ = frozenset({})#
- __init__(remote_path=None, **kwargs)[source]#
Construct a new instance, setting the
sourceattribute if provided as a keyword argument.
- __module__ = 'aiida.orm.nodes.data.remote.base'#
- __parameters__ = ()#
- _abc_impl = <_abc_data object>#
- _clean(transport=None)[source]#
Remove all content of the remote folder on the remote computer.
When the cleaning operation is successful, the extra with the key
RemoteData.KEY_EXTRA_CLEANEDis set.- Parameters
transport – Provide an optional transport that is already open. If not provided, a transport will be automatically opened, based on the current default user and the computer of this data node. Passing in the transport can be used for efficiency if a great number of nodes need to be cleaned for the same computer. Note that the user should take care that the correct transport is passed.
- Raises
ValueError – If the hostname of the provided transport does not match that of the node’s computer.
- _logger: Optional[logging.Logger] = <Logger aiida.orm.nodes.data.remote.base.RemoteData (REPORT)>#
- _validate()[source]#
Validate information stored in Node object.
For the
Nodebase class, this check is always valid. Subclasses can override this method to perform additional checks and should usually callsuper()._validate()first!This method is called automatically before storing the node in the DB. Therefore, use
get()and similar methods that automatically read either from the DB or from the internal attribute cache.
- getfile(relpath, destpath)[source]#
Connects to the remote folder and retrieves the content of a file.
- Parameters
relpath – The relative path of the file on the remote to retrieve.
destpath – The absolute path of where to store the file on the local machine.
- property is_empty#
Check if remote folder is empty
- listdir(relpath='.')[source]#
Connects to the remote folder and lists the directory content.
- Parameters
relpath – If ‘relpath’ is specified, lists the content of the given subfolder.
- Returns
a flat list of file/directory names (as strings).
- listdir_withattributes(path='.')[source]#
Connects to the remote folder and lists the directory content.
- Parameters
relpath – If ‘relpath’ is specified, lists the content of the given subfolder.
- Returns
a list of dictionaries, where the documentation is in :py:class:Transport.listdir_withattributes.