Skip to content

lablink_allocator_service.providers.manual

ManualProvider — BYO hosts the instructor registers; LabLink never provisions/destroys/recovers them. LAN-agnostic: LAN lives only in the injected ClientConnectivity, never here.

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()
    )
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."
    )
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)
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)
    ]
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."
    )
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."
    )