sssd_test_framework.roles.base
Base classes and objects for SSSD specific multihost roles.
Classes
|
Base Linux role for roles that require direct LDAP access. |
|
Base linux role. |
|
Base class for object management classes (like users or groups). |
|
Base role class. |
|
Base Windows role. |
This class is used to distinguish between setting an attribute to an empty value and deleting it completely. |
- class sssd_test_framework.roles.base.DeleteAttribute
Bases:
objectThis class is used to distinguish between setting an attribute to an empty value and deleting it completely.
- class sssd_test_framework.roles.base.BaseObject(role: RoleType)
Bases:
Generic[HostType,RoleType]Base class for object management classes (like users or groups).
It provides shortcuts to low level functionality to easily enable execution of remote commands. It also defines multiple helper methods that are shared across roles.
- role: RoleType
Multihost role object.
- host: HostType
Multihost host object.
- cli: CLIBuilder
Command line builder to easy build command line for execution.
- class sssd_test_framework.roles.base.BaseRole(*args, **kwargs)
Bases:
MultihostRole[HostType]Base role class. Roles are the main interface to the remote hosts that can be directly accessed in test cases as fixtures.
All changes to the remote host that were done through the role object API are automatically reverted when a test is finished.
- Delete: DeleteAttribute = <sssd_test_framework.roles.base.DeleteAttribute object>
Use this to indicate that you want to delete an attribute instead of setting it to an empty value.
- is_delete_attribute(value: Any) TypeGuard[DeleteAttribute]
Return
Trueif the value isDeleteAttribute- Parameters:
value (Any) – Value to test.
- Returns:
Return
Trueif the value isDeleteAttribute- Return type:
TypeGuard[DeleteAttribute]
- property features: dict[str, bool]
Features supported by the role.
- ssh(user: str, password: str, *, shell: Shell | None = None) SSHClient
Open SSH connection to the host as given user.
- Parameters:
user (str) – Username.
password (str) – User password.
shell (Shell | None, optional) – Shell that will run the commands, defaults to
None(=Bash)
- Returns:
SSH client connection.
- Return type:
SSHClient
- class sssd_test_framework.roles.base.BaseLinuxRole(*args, **kwargs)
Bases:
BaseRole[HostType]Base linux role.
- authselect: AuthselectUtils
Manage nsswitch and PAM configuration.
- fs: LinuxFileSystem
File system manipulation.
- svc: SystemdServices
Systemd service management.
- firewall: Firewalld
Configure firewall using firewalld.
- tc: LinuxTrafficControl
Traffic control manipulation.
- tools: LinuxToolsUtils
Standard tools interface.
- net: NetworkUtils
Network tools interface.
- auth: AuthenticationUtils
Authentication helpers.
- hostnameutils: HostnameUtils
Hostname utilities.
- journald: JournaldUtils
Journald utilities.
- auditd: Auditd
Auditd utilities.
- coredumpd: Coredumpd
Coredumpd utilities.
- chrony: ChronyUtils
Chrony time manipulation utilities.
- class sssd_test_framework.roles.base.BaseLinuxLDAPRole(*args, **kwargs)
Bases:
BaseLinuxRole[LDAPHostType]Base Linux role for roles that require direct LDAP access.
- auto_ou: dict[str, bool]
Organizational units that were automatically created.
- abstractmethod ou(name: str, basedn=None)
- class sssd_test_framework.roles.base.BaseWindowsRole(*args, **kwargs)
Bases:
BaseRole[HostType]Base Windows role.
- firewall: WindowsFirewall
Configure Windows firewall.
- ssh(user: str, password: str, *, shell: Shell | None = None) SSHClient
Open SSH connection to the host as given user.
- Parameters:
user (str) – Username.
password (str) – User password.
shell (Shell | None, optional) – Shell that will run the commands, defaults to
None(=Powershell)
- Returns:
SSH client connection.
- Return type:
SSHClient