mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-30 07:33:59 +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>
31 lines
1.2 KiB
Go
31 lines
1.2 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"
|
|
)
|
|
|
|
// Provider represents an AI provider registration.
|
|
type Provider = types.Provider
|
|
|
|
// ProviderSpec holds provider-specific configuration and credentials.
|
|
type ProviderSpec = types.ProviderSpec
|
|
|
|
// ProviderInterface defines CRUD and Ensure operations on providers,
|
|
// plus sub-client accessors for profiles and credential refresh.
|
|
type ProviderInterface interface {
|
|
Create(ctx context.Context, workspace string, provider *Provider) (*Provider, error)
|
|
Get(ctx context.Context, workspace, name string) (*Provider, error)
|
|
List(workspace string, opts ...ListOptions) (*Pager[*Provider], error)
|
|
ListAll(ctx context.Context, workspace string, opts ...ListOptions) ([]*Provider, error)
|
|
Update(ctx context.Context, workspace string, provider *Provider) (*Provider, error)
|
|
Delete(ctx context.Context, workspace, name string, opts ...DeleteOptions) (*DeletionResult, error)
|
|
Ensure(ctx context.Context, workspace string, provider *Provider) (*Provider, error)
|
|
Profiles() ProfileInterface
|
|
Refresh() RefreshInterface
|
|
}
|