From f58939c33d5777c3c813927831bc260cd94baf57 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Mon, 13 Jan 2025 22:01:10 -0800 Subject: [PATCH] Remove deprecated WithCDIDevices in oci spec opts This function has been moved to prevent an unintended dependency on CDI. Signed-off-by: Derek McGowan (cherry picked from commit bdc847f1eb535a6728b6db3f2619d2a5ed0edbb9) Signed-off-by: Derek McGowan --- pkg/oci/spec_opts.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkg/oci/spec_opts.go b/pkg/oci/spec_opts.go index 7ea08b71f..3b85d764a 100644 --- a/pkg/oci/spec_opts.go +++ b/pkg/oci/spec_opts.go @@ -1642,14 +1642,3 @@ func WithWindowsNetworkNamespace(ns string) SpecOpts { return nil } } - -// WithCDIDevices should be used from the cdi package. This version is used for -// compatibility to point to the non-deprecated version but will return an error if used. -// This function will be removed in 2.1. -// -// Deprecated: Use [github.com/containerd/containerd/v2/pkg/cdi.WithCDIDevices] instead. -func WithCDIDevices(devices ...string) SpecOpts { - return func(ctx context.Context, _ Client, c *containers.Container, s *Spec) error { - return errors.New("must use cdi package for CDI device injection") - } -}