clan_lib: Remote add to arguments override func
This commit is contained in:
@@ -122,7 +122,7 @@ def upload_sources(machine: Machine, ssh: Host, upload_inputs: bool) -> str:
|
||||
def run_machine_update(
|
||||
machine: Machine,
|
||||
target_host: Remote | LocalHost,
|
||||
build_host: Remote | LocalHost | None,
|
||||
build_host: Remote | LocalHost | None = None,
|
||||
upload_inputs: bool = False,
|
||||
) -> None:
|
||||
"""Update an existing machine using nixos-rebuild or darwin-rebuild.
|
||||
|
||||
@@ -64,6 +64,8 @@ class Remote:
|
||||
def override(
|
||||
self,
|
||||
*,
|
||||
user: str | None = None,
|
||||
address: str | None = None,
|
||||
host_key_check: HostKeyCheck | None = None,
|
||||
private_key: Path | None = None,
|
||||
password: str | None = None,
|
||||
@@ -75,8 +77,8 @@ class Remote:
|
||||
) -> "Remote":
|
||||
"""Returns a new Remote instance with the same data but with a different host_key_check."""
|
||||
return Remote(
|
||||
address=self.address,
|
||||
user=self.user,
|
||||
address=address or self.address,
|
||||
user=user or self.user,
|
||||
command_prefix=command_prefix or self.command_prefix,
|
||||
port=port or self.port,
|
||||
private_key=private_key if private_key is not None else self.private_key,
|
||||
|
||||
Reference in New Issue
Block a user