The nova.virt.libvirt.volume.remotefs Module¶
-
class
RemoteFilesystem¶ Bases:
objectRepresents actions that can be taken on a remote host’s filesystem.
-
copy_file(src, dst, on_execute=None, on_completion=None, compression=True)¶
-
create_dir(host, dst_path, on_execute=None, on_completion=None)¶
-
create_file(host, dst_path, on_execute=None, on_completion=None)¶
-
remove_dir(host, dst_path, on_execute=None, on_completion=None)¶
-
remove_file(host, dst_path, on_execute=None, on_completion=None)¶
-
-
class
RemoteFilesystemDriver¶ Bases:
object-
copy_file(src, dst, on_execute, on_completion)¶ Copy file to/from remote host.
- Remote address must be specified in format:
- REM_HOST_IP_ADDRESS:REM_HOST_PATH
- For example:
- 192.168.1.10:/home/file
Parameters: - src – Source address
- dst – Destination path
- on_execute – Callback method to store pid of process in cache
- on_completion – Callback method to remove pid of process from
-
create_dir(host, dst_path, on_execute, on_completion)¶ Create directory on the remote system.
Parameters: - host – Remote host
- dst_path – Destination path
- on_execute – Callback method to store pid of process in cache
- on_completion – Callback method to remove pid of process from cache
-
create_file(host, dst_path, on_execute, on_completion)¶ Create file on the remote system.
Parameters: - host – Remote host
- dst_path – Destination path
- on_execute – Callback method to store pid of process in cache
- on_completion – Callback method to remove pid of process from cache
-
remove_dir(host, dst_path, on_execute, on_completion)¶ Removes a directory on a remote host.
Parameters: - host – Remote host
- dst_path – Destination path
- on_execute – Callback method to store pid of process in cache
- on_completion – Callback method to remove pid of process from cache
-
remove_file(host, dst_path, on_execute, on_completion)¶ Removes a file on a remote host.
Parameters: - host – Remote host
- dst_path – Destination path
- on_execute – Callback method to store pid of process in cache
- on_completion – Callback method to remove pid of process from cache
-
-
class
RsyncDriver¶ Bases:
nova.virt.libvirt.volume.remotefs.RemoteFilesystemDriver-
copy_file(src, dst, on_execute, on_completion, compression)¶
-
create_dir(*args, **kwargs)¶
-
create_file(*args, **kwargs)¶
-
remove_dir(*args, **kwargs)¶
-
remove_file(*args, **kwargs)¶
-
-
class
SshDriver¶ Bases:
nova.virt.libvirt.volume.remotefs.RemoteFilesystemDriver-
copy_file(src, dst, on_execute, on_completion, compression)¶
-
create_dir(host, dst_path, on_execute, on_completion)¶
-
create_file(host, dst_path, on_execute, on_completion)¶
-
remove_dir(host, dst, on_execute, on_completion)¶
-
remove_file(host, dst, on_execute, on_completion)¶
-
-
create_tmp_dir(function)¶ Creates temporary directory for rsync purposes. Removes created directory in the end.
Mount a remote export to mount_path.
Parameters: - mount_path – place where the remote export will be mounted
- export_path – path of the export to be mounted
Export_type: remote export type (e.g. cifs, nfs, etc.)
Options: A list containing mount options
Unmount a remote share.
Parameters: - mount_path – remote export mount point
- export_path – path of the remote export to be unmounted