sssd_test_framework.hosts.nfs

NFS multihost host.

Classes

NFSHost(*args, **kwargs)

NFS server host object.

class sssd_test_framework.hosts.nfs.NFSHost(*args, **kwargs)

Bases: BaseHost, BaseLinuxHost

NFS server host object.

Provides features specific to NFS server.

This class adds config.exports_dir multihost configuration option to set the top level NFS exports directory where additional shares are created by individual test cases.

Example multihost configuration
- hostname: nfs.test
  role: nfs
  config:
    exports_dir: /dev/shm/exports

Note

Full backup and restore is supported.

Parameters:
  • auto_start – Automatically start service before taking the first backup.

  • auto_restore (bool, optional) – If True, the host is automatically restored to the backup state when a test is finished in teardown(), defaults to True

exports_dir: str

Top level NFS exports directory, defaults to /exports.

start() None

Start required services.

Raises:

NotImplementedError – If start operation is not supported.

stop() None

Stop required services.

Raises:

NotImplementedError – If stop operation is not supported.

backup() Any

Backup NFS server.

Returns:

Backup data.

Return type:

Any

restore(backup_data: Any | None) None

Restore NFS server to its initial contents.

Returns:

Backup data.

Return type:

Any