mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-25 06:42:52 +08:00
* feat(api): return typed deletion outcomes with explicit missing-target semantics Implement phase 2 of #3051 across the public gateway API and first-party SDKs. Preserve asynchronous sandbox deletion and observed resource identities, reserve legacy wire fields, and document the coordinated migration. Signed-off-by: Mrunal Patel <mrunalp@gmail.com> * fix(sdk): bind deletion waits to sandbox identity Track accepted deletions by original sandbox identity in Rust and TypeScript. Preserve name-only waits and cover replacement races and lookup failures. Merge the phase-one cleanup fix and adapt its interceptor regressions to typed deletion outcomes. Refs #3051. Signed-off-by: Mrunal Patel <mrunalp@gmail.com> * test(e2e): accept asynchronous stopped sandbox deletion Allow either completed or accepted deletion output, then continue polling for actual sandbox absence. This preserves the lifecycle assertion under the phase-two deletion contract. Refs #3051. Signed-off-by: Mrunal Patel <mrunalp@gmail.com> --------- Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
66 lines
2.7 KiB
Go
66 lines
2.7 KiB
Go
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package v1
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/NVIDIA/OpenShell/sdk/go/openshell/v1/types"
|
|
)
|
|
|
|
// ProviderProfile represents a provider type template.
|
|
type ProviderProfile = types.ProviderProfile
|
|
|
|
// ProfileCredential defines a single credential required by a provider profile.
|
|
type ProfileCredential = types.ProfileCredential
|
|
|
|
// ProfileCategory classifies a provider profile.
|
|
type ProfileCategory = types.ProfileCategory
|
|
|
|
// NetworkEndpoint describes a network endpoint provided by a profile.
|
|
type NetworkEndpoint = types.NetworkEndpoint
|
|
|
|
// NetworkBinary describes a binary artifact provided by a profile.
|
|
type NetworkBinary = types.NetworkBinary
|
|
|
|
// ProfileDiscovery holds local discovery configuration for a profile.
|
|
type ProfileDiscovery = types.ProfileDiscovery
|
|
|
|
// ProfileImportItem is an item submitted for profile import or lint validation.
|
|
type ProfileImportItem = types.ProfileImportItem
|
|
|
|
// ProfileDiagnostic is a validation finding from Import, Update, or Lint.
|
|
type ProfileDiagnostic = types.ProfileDiagnostic
|
|
|
|
// ImportResult holds the result of a profile import operation.
|
|
type ImportResult = types.ImportResult
|
|
|
|
// UpdateResult holds the result of a profile update operation.
|
|
type UpdateResult = types.UpdateResult
|
|
|
|
// LintResult holds the result of a profile lint operation.
|
|
type LintResult = types.LintResult
|
|
|
|
// ProfileCategory values.
|
|
const (
|
|
ProfileCategoryOther = types.ProfileCategoryOther
|
|
ProfileCategoryInference = types.ProfileCategoryInference
|
|
ProfileCategoryAgent = types.ProfileCategoryAgent
|
|
ProfileCategorySourceControl = types.ProfileCategorySourceControl
|
|
ProfileCategoryMessaging = types.ProfileCategoryMessaging
|
|
ProfileCategoryData = types.ProfileCategoryData
|
|
ProfileCategoryKnowledge = types.ProfileCategoryKnowledge
|
|
)
|
|
|
|
// ProfileInterface defines operations for managing provider profiles.
|
|
type ProfileInterface interface {
|
|
List(workspace string, opts ...ListOptions) (*Pager[*ProviderProfile], error)
|
|
ListAll(ctx context.Context, workspace string, opts ...ListOptions) ([]*ProviderProfile, error)
|
|
Get(ctx context.Context, workspace, id string) (*ProviderProfile, error)
|
|
Import(ctx context.Context, workspace string, items []ProfileImportItem) (*ImportResult, error)
|
|
Update(ctx context.Context, workspace, id string, expectedResourceVersion uint64, item ProfileImportItem) (*UpdateResult, error)
|
|
Lint(ctx context.Context, workspace string, items []ProfileImportItem) (*LintResult, error)
|
|
Delete(ctx context.Context, workspace, id string, opts ...DeleteOptions) (*DeletionResult, error)
|
|
}
|