Merge pull request 'API: add sane defaults to some endpoints' (#4645) from readonly into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4645
This commit is contained in:
@@ -26,8 +26,10 @@ log = logging.getLogger(__name__)
|
||||
|
||||
@dataclass
|
||||
class SystemConfig:
|
||||
language: str | None = field(default=None)
|
||||
keymap: str | None = field(default=None)
|
||||
keymap: str = field(default="en")
|
||||
language: str = field(
|
||||
default="en_US.UTF-8"
|
||||
) # Leave this default, or implement virtual scrolling for the 400+ options in the UI.
|
||||
ssh_keys_path: list[str] | None = field(default=None)
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ def get_machine_target_platform(machine: Machine) -> str | None:
|
||||
@dataclass
|
||||
class HardwareGenerateOptions:
|
||||
machine: Machine
|
||||
backend: HardwareConfig
|
||||
backend: HardwareConfig = HardwareConfig.NIXOS_FACTER
|
||||
password: str | None = None
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class Host(ABC):
|
||||
This provides a common interface for both local and remote hosts.
|
||||
"""
|
||||
|
||||
command_prefix: str
|
||||
command_prefix: str | None
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
|
||||
@@ -33,7 +33,7 @@ NO_OUTPUT_TIMEOUT = 20
|
||||
@dataclass(frozen=True)
|
||||
class Remote(Host):
|
||||
address: str
|
||||
command_prefix: str
|
||||
command_prefix: str | None
|
||||
user: str = "root"
|
||||
port: int | None = None
|
||||
private_key: Path | None = None
|
||||
|
||||
Reference in New Issue
Block a user