(
request: Request, session: SessionDep, ctx: TenantContextDep, id: int
)
| 713 | |
| 714 | @router.get("/{id}/registration-token", response_model=ClusterRegistrationTokenPublic) |
| 715 | async def get_registration_token( |
| 716 | request: Request, session: SessionDep, ctx: TenantContextDep, id: int |
| 717 | ): |
| 718 | cluster = await Cluster.one_by_id(session, id) |
| 719 | if not cluster or cluster.deleted_at is not None: |
| 720 | raise NotFoundException(message=f"cluster {id} not found") |
| 721 | # Registration token is a write-class secret (anyone holding it can |
| 722 | # register a worker into this cluster) — gate with the writable check. |
| 723 | assert_cluster_writable(ctx, cluster) |
| 724 | return get_registration_from_cluster(request, cluster) |
| 725 | |
| 726 | |
| 727 | @router.get("/{id}/manifests") |
nothing calls this directly
no test coverage detected