MCPcopy
hub / github.com/gpustack/gpustack / get_registration_token

Function get_registration_token

gpustack/routes/clusters.py:715–724  ·  view source on GitHub ↗
(
    request: Request, session: SessionDep, ctx: TenantContextDep, id: int
)

Source from the content-addressed store, hash-verified

713
714@router.get("/{id}/registration-token", response_model=ClusterRegistrationTokenPublic)
715async 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")

Callers

nothing calls this directly

Calls 3

assert_cluster_writableFunction · 0.90
one_by_idMethod · 0.80

Tested by

no test coverage detected