lablink_allocator_service.providers.protocol¶
lablink_allocator_service.providers.protocol
¶
Provider contracts. Behavior-preserving: BrowserSessionTarget is the exact dataclass client_session already returns (re-exported, not redefined) so routes/internal_proxy_auth.py and existing tests are unaffected.
Classes¶
ClientConnectivity
¶
ClientHandle(id, hostname, provider_metadata=dict())
dataclass
¶
ClientJoinMaterial(register_token, allocator_url, connectivity, client_image)
dataclass
¶
ComputeProvider
¶
Bases: Protocol
Attributes¶
can_destroy_hosts
instance-attribute
¶
can_provision_hosts
instance-attribute
¶
can_recover_hosts
instance-attribute
¶
client_connectivity
instance-attribute
¶
name
instance-attribute
¶
Methods:¶
destroy_hosts(handles, progress_callback=None)
¶
get_host_access(hostname)
¶
Return (instance_id, public_ip, ssh_key_path) for hostname.
Any component may be None if unavailable (no credentials, not
reachable, etc.). Providers that cannot recover hosts should
return (None, None, None) — _reboot_vm gates on
can_recover_hosts before calling this, so it will only ever
be invoked on capable providers.
Source code in packages/allocator/src/lablink_allocator_service/providers/protocol.py
list_hosts()
¶
Source code in packages/allocator/src/lablink_allocator_service/providers/protocol.py
provision_hosts(count, spec, progress_callback=None)
¶
DestroyResult(stdout)
dataclass
¶
ProvisionResult(handles, timings, apply_stdout)
dataclass
¶
ProvisioningNotSupported
¶
Bases: Exception
Raised by a provider whose structural model does not support a
lifecycle operation. For example, ManualProvider cannot ever provision
hosts because the operator brings them; raising this signals "never".