waft.configuration.config_file.models module¶
Data models for configuration file handling.
- class waft.configuration.config_file.models.ConfigInfo(*, systems: list[~waft.configuration.config_file.models.UserConfiguredSystem] = <factory>, proxies: list[~waft.configuration.config_file.models.UserConfiguredProxy] = <factory>, groups: dict[str, list[str]] = <factory>)¶
Bases:
BaseModelDefinition of the configuration dictionary.
- groups: dict[str, list[str]]¶
- json() dict¶
Use Pydantic’s model_dump to serialize the system properly, converting enums to values
- model_config: ClassVar[ConfigDict] = {'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- proxies: list[UserConfiguredProxy]¶
- property proxy_map¶
Map proxy names to UserConfiguredProxy objects.
- property system_map¶
Map system names to UserConfiguredSystem objects.
- systems: list[UserConfiguredSystem]¶
- waft.configuration.config_file.models.UserConfiguredGroups¶
Represents a group of systems from the config file
alias of
dict[str,list[str]]
- class waft.configuration.config_file.models.UserConfiguredLocalSystem(*, name: str = 'local', username: str = <factory>, port: int = 22, hostname: str = 'localhost', warp_version: str | None = None, warp_upgrade_from_version: str | None = None, password: str | None = None, cloud_provider: ~waft.enums.CloudProvider | None = None, vm_spec: str | None = None, size: str | None = None, auto_delete: bool = True, proxy: str | None = None, proxy_details: ~waft.configuration.config_file.models.UserConfiguredProxy | None = None, description: str | None = None, resource_group: str | None = None, platform: str | None = None)¶
Bases:
UserConfiguredSystemLocal system is the class representing the literal local system
- hostname: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- username: str¶
- class waft.configuration.config_file.models.UserConfiguredProxy(*, name: str, hostname: str, username: str, port: int = 22)¶
Bases:
BaseModelRepresents a proxy system
- hostname: str¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str¶
- port: int¶
- username: str¶
- class waft.configuration.config_file.models.UserConfiguredSystem(*, name: str, username: str, port: int = 22, hostname: str | None = None, warp_version: str | None = None, warp_upgrade_from_version: str | None = None, password: str | None = None, cloud_provider: CloudProvider | None = None, vm_spec: str | None = None, size: str | None = None, auto_delete: bool = True, proxy: str | None = None, proxy_details: UserConfiguredProxy | None = None, description: str | None = None, resource_group: str | None = None, platform: str | None = None)¶
Bases:
BaseModelUserConfiguredSystem is the python object deserialized from the configuration file
- auto_delete: bool¶
- cloud_provider: CloudProvider | None¶
- description: str | None¶
- get_platform() str¶
Determine platform from system configuration.
- Returns:
Platform string (‘linux’, ‘windows’, or ‘macos’)
- Raises:
ValueError – If platform cannot be determined from available information
- hostname: str | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(_UserConfiguredSystem__context) None¶
Validate configuration after model initialization.
- name: str¶
- password: str | None¶
- platform: str | None¶
- port: int¶
- proxy: str | None¶
- proxy_details: UserConfiguredProxy | None¶
- resource_group: str | None¶
- size: str | None¶
- username: str¶
- validate_vm_configuration() None¶
Validates that vm_spec and cloud_provider both exist if one is specified.
- vm_spec: str | None¶
- warp_upgrade_from_version: str | None¶
- warp_version: str | None¶