clan-cli: Use Remote class in DeployInfo, add tests for qrcode parser and json parser
This commit is contained in:
@@ -19,7 +19,13 @@ def parse_deployment_address(
|
||||
forward_agent: bool = True,
|
||||
meta: dict[str, Any] | None = None,
|
||||
private_key: Path | None = None,
|
||||
password: str | None = None,
|
||||
tor_socks: bool = False,
|
||||
) -> "Remote":
|
||||
if address.startswith("ssh://"):
|
||||
# Strip the `ssh://` prefix if it exists
|
||||
address = address[len("ssh://") :]
|
||||
|
||||
parts = address.split("?", maxsplit=1)
|
||||
endpoint, maybe_options = parts if len(parts) == 2 else (parts[0], "")
|
||||
|
||||
@@ -66,8 +72,10 @@ def parse_deployment_address(
|
||||
user=user,
|
||||
port=port,
|
||||
private_key=private_key,
|
||||
password=password,
|
||||
host_key_check=host_key_check,
|
||||
command_prefix=machine_name,
|
||||
forward_agent=forward_agent,
|
||||
ssh_options=options,
|
||||
tor_socks=tor_socks,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user