mirror of
https://github.com/containerd/containerd.git
synced 2026-08-03 22:50:44 +00:00
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>
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user