aiida.orm.nodes.data.remote package#
Module with data plugins that represent remote resources and so effectively are symbolic links.
Subpackages#
- aiida.orm.nodes.data.remote.stash package
- Submodules
RemoteStashData
RemoteStashFolderData
RemoteStashFolderData.__abstractmethods__
RemoteStashFolderData.__init__()
RemoteStashFolderData.__module__
RemoteStashFolderData.__parameters__
RemoteStashFolderData.__plugin_type_string
RemoteStashFolderData.__query_type_string
RemoteStashFolderData._abc_impl
RemoteStashFolderData._logger
RemoteStashFolderData._storable
RemoteStashFolderData.source_list
RemoteStashFolderData.target_basepath
- Submodules
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:
Data
Store 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
source
attribute if provided as a keyword argument.
- __module__ = 'aiida.orm.nodes.data.remote.base'#
- __parameters__ = ()#
- _abc_impl = <_abc._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_CLEANED
is 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.
- _validate()[source]#
Validate information stored in Node object.
For the
Node
base 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_cleaned#
Return whether the remote folder has been cleaned.
- 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.