Remove deprecated WithCDIDevices in oci spec opts

This function has been moved to prevent an unintended dependency on CDI.

Signed-off-by: Derek McGowan <derek@mcg.dev>
(cherry picked from commit bdc847f1eb535a6728b6db3f2619d2a5ed0edbb9)
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan 2025-01-13 22:01:10 -08:00
parent 3d53430fe1
commit f58939c33d
No known key found for this signature in database
GPG Key ID: F58C5D0A4405ACDB

View File

@ -1642,14 +1642,3 @@ func WithWindowsNetworkNamespace(ns string) SpecOpts {
return nil 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")
}
}