sssd_test_framework.roles.nfs
NFS multihost role.
Classes
|
NFS role. |
|
NFS shared folder management. |
- class sssd_test_framework.roles.nfs.NFS(*args, **kwargs)
Bases:
BaseLinuxRole[NFSHost]NFS role.
Provides unified Python API for managing shared folders on the NFS server.
Creating user and group@pytest.mark.topology(KnownTopology.LDAP) def test_example(nfs: NFS): nfs.export('test').add()
Note
The role object is instantiated automatically as a dynamic pytest fixture by the multihost plugin. You should not create the object manually.
- hostname: str
NFS server hostname.
- exports_dir: str
Top level exports directory.
- exportfs_reload() None
Reexport all directories.
- class sssd_test_framework.roles.nfs.NFSExport(role: NFS, path: str)
Bases:
BaseObject[NFSHost,NFS]NFS shared folder management.
- hostname: str
NFS server hostname.
- path: str
Exported path relative to the top level exports directory.
- fullpath: str
Absolute path of the exported directory.
- exports_file
NFS exports file that manages this directory.
- opts: str
NFS export options, defaults to
rw,sync,no_root_squash.
- add(*, opts: str = 'rw,sync,no_root_squash', reload: bool = True) NFSExport
Start sharing this directory.
- Parameters:
opts (str, optional) – NFS export options, defaults to ‘rw,sync,no_root_squash’
reload (bool, optional) – Immediately reexport all directories, defaults to True
- Returns:
Self.
- Return type:
- get() str
Get NFS export specification for automounter.
- Return type:
str