Documentation
¶
Overview ¶
Package resolve maps a user-facing name (and optional OCID bypass) into the full *models.GpuNode / *models.GpuPool struct that the OCI compute actions require. Used by both `toolkit get`-derived mutation subcommands (internal/cli) and the MCP server's mutating tools (internal/mcp), so the find-by-name + OCI-enrichment chain lives in one place.
Index ¶
- func CompartmentID(ctx context.Context, kubeConfig string, env models.Environment) (string, error)
- func GpuNode(ctx context.Context, ld loader.Loader, kubeConfig string, ...) (*models.GpuNode, error)
- func GpuPool(ctx context.Context, ld loader.Loader, repoPath, kubeConfig string, ...) (*models.GpuPool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompartmentID ¶
CompartmentID queries the cluster for any GPU node and returns its CompartmentID. Used to scope OCI ListInstancePools calls during pool enrichment.
func GpuNode ¶
func GpuNode(ctx context.Context, ld loader.Loader, kubeConfig string, env models.Environment, name, ocid string) (*models.GpuNode, error)
GpuNode finds a *models.GpuNode for the OCI compute actions. With ocid set, no cluster call is made — a stub {Name, ID:ocid} is returned. With ocid empty, the loader is consulted and the named node is returned by walking every pool.
func GpuPool ¶
func GpuPool(ctx context.Context, ld loader.Loader, repoPath, kubeConfig string, env models.Environment, name string) (*models.GpuPool, error)
GpuPool loads GPU pools from the Terraform repo, finds the named one, then enriches with the live OCI ID + ActualSize via PopulateGpuPools. Partial-load on the Terraform pass is tolerated as long as the named pool is among the rows that did load — that matches the behavior of `toolkit get gpupool`.
Types ¶
This section is empty.