ManualProvider — BYO hosts the instructor registers; LabLink never
provisions/destroys/recovers them. LAN-agnostic: LAN lives only in the
injected ClientConnectivity, never here.
Classes
ManualProvider(*, region=None, tofu_dir=None, client_connectivity=None, **_)
Source code in packages/allocator/src/lablink_allocator_service/providers/manual.py
| def __init__(self, *, region=None, tofu_dir=None,
client_connectivity=None, **_):
self.client_connectivity = (
client_connectivity
if client_connectivity is not None
else LANDirectClientConnectivity()
)
|
Attributes
can_destroy_hosts = False
class-attribute
instance-attribute
can_provision_hosts = False
class-attribute
instance-attribute
can_recover_hosts = False
class-attribute
instance-attribute
client_connectivity = client_connectivity if client_connectivity is not None else LANDirectClientConnectivity()
instance-attribute
name = 'manual'
class-attribute
instance-attribute
Methods:
destroy_hosts(handles, progress_callback=None)
Source code in packages/allocator/src/lablink_allocator_service/providers/manual.py
| def destroy_hosts(self, handles, progress_callback=None):
raise ProvisioningNotSupported(
"ManualProvider cannot destroy BYO machines."
)
|
get_host_access(hostname)
Source code in packages/allocator/src/lablink_allocator_service/providers/manual.py
| def get_host_access(self, hostname):
# ManualProvider.can_recover_hosts is False; _reboot_vm gates on
# this capability flag before ever calling get_host_access, so
# this path is unreachable in normal operation.
return (None, None, None)
|
list_hosts()
Source code in packages/allocator/src/lablink_allocator_service/providers/manual.py
| def list_hosts(self):
return [
ClientHandle(id=h, hostname=h)
for h in _db().list_hosts_by_provider(self.name)
]
|
provision_hosts(count, spec, progress_callback=None)
Source code in packages/allocator/src/lablink_allocator_service/providers/manual.py
| def provision_hosts(self, count, spec, progress_callback=None):
raise ProvisioningNotSupported(
"ManualProvider doesn't provision — instructor brings the "
"machines. Use 'lablink launch' for the registration command."
)
|
recover_hosts(handles)
Source code in packages/allocator/src/lablink_allocator_service/providers/manual.py
| def recover_hosts(self, handles):
raise ProvisioningNotSupported(
"ManualProvider cannot recover BYO machines; the box rejoins "
"via docker --restart + idempotent re-registration."
)
|