waft.system.nodes.node_factory module¶
- class waft.system.nodes.node_factory.NodeFactory¶
Bases:
objectFactory for producing instances of a node
- client_mapping: dict[Client, type[ClientBase]] = {Client.LOCAL: <class 'waft.system.clients.local_client.LocalClient'>, Client.SSH: <class 'waft.system.clients.ssh_client.SshClient'>}¶
- classmethod create(system: ConfiguredSystem) BaseNode¶
Connect and return a node instance based on the platform and client protocol specified in the system configuration.
- Parameters:
system (ConfiguredSystem) – System configuration
- Returns:
Platform node instance
- Return type:
- Raises:
ValueError – If the client protocol or platform is unsupported or unknown.
- classmethod determine_platform(client: ClientBase) Platforms¶
Determine platform of client node.
- platform_mapping: dict[Platforms, type[BaseNode]] = {Platforms.ALMALINUX: <class 'waft.system.nodes.almalinux_node.AlmaLinuxNode'>, Platforms.CENTOS: <class 'waft.system.nodes.centos_node.CentOSNode'>, Platforms.DEBIAN: <class 'waft.system.nodes.debian_node.DebianNode'>, Platforms.FEDORA: <class 'waft.system.nodes.fedora_node.FedoraNode'>, Platforms.MACOS: <class 'waft.system.nodes.macos_node.MacOSNode'>, Platforms.RHEL: <class 'waft.system.nodes.rhel_node.RedHatNode'>, Platforms.UBUNTU: <class 'waft.system.nodes.ubuntu_node.UbuntuNode'>, Platforms.WINDOWS: <class 'waft.system.nodes.windows_node.WindowsNode'>}¶