Adding upstream version 1:4.17.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
8e3999c01a
commit
09a180ea01
11145 changed files with 938455 additions and 0 deletions
53
tests/system/framework/config.py
Normal file
53
tests/system/framework/config.py
Normal file
|
@ -0,0 +1,53 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Type
|
||||
|
||||
from pytest_mh import MultihostConfig, MultihostDomain, MultihostHost, MultihostRole
|
||||
|
||||
__all__ = [
|
||||
"ShadowMultihostConfig",
|
||||
"ShadowMultihostDomain",
|
||||
]
|
||||
|
||||
|
||||
class ShadowMultihostConfig(MultihostConfig):
|
||||
@property
|
||||
def id_to_domain_class(self) -> dict[str, Type[MultihostDomain]]:
|
||||
"""
|
||||
All domains are mapped to :class:`ShadowMultihostDomain`.
|
||||
|
||||
:rtype: Class name.
|
||||
"""
|
||||
return {"*": ShadowMultihostDomain}
|
||||
|
||||
|
||||
class ShadowMultihostDomain(MultihostDomain[ShadowMultihostConfig]):
|
||||
@property
|
||||
def role_to_host_class(self) -> dict[str, Type[MultihostHost]]:
|
||||
"""
|
||||
Map roles to classes:
|
||||
|
||||
* shadow to ShadowHost
|
||||
|
||||
:rtype: Class name.
|
||||
"""
|
||||
from .hosts.shadow import ShadowHost
|
||||
|
||||
return {
|
||||
"shadow": ShadowHost,
|
||||
}
|
||||
|
||||
@property
|
||||
def role_to_role_class(self) -> dict[str, Type[MultihostRole]]:
|
||||
"""
|
||||
Map roles to classes:
|
||||
|
||||
* shadow to Shadow
|
||||
|
||||
:rtype: Class name.
|
||||
"""
|
||||
from .roles.shadow import Shadow
|
||||
|
||||
return {
|
||||
"shadow": Shadow,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue