Bump tags.cncf.io/container-device-interface to v0.7.1
This includes migrating from cdi.GetRegistry() to cdi.Configure() and using top-level cdi Refresh and InjectDevices functions as applicable. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -1651,8 +1651,7 @@ func WithCDIDevices(devices ...string) SpecOpts {
|
||||
return nil
|
||||
}
|
||||
|
||||
registry := cdi.GetRegistry()
|
||||
if err := registry.Refresh(); err != nil {
|
||||
if err := cdi.Refresh(); err != nil {
|
||||
// We don't consider registry refresh failure a fatal error.
|
||||
// For instance, a dynamically generated invalid CDI Spec file for
|
||||
// any particular vendor shouldn't prevent injection of devices of
|
||||
@@ -1661,7 +1660,7 @@ func WithCDIDevices(devices ...string) SpecOpts {
|
||||
log.G(ctx).Warnf("CDI registry refresh failed: %v", err)
|
||||
}
|
||||
|
||||
if _, err := registry.InjectDevices(s, devices...); err != nil {
|
||||
if _, err := cdi.InjectDevices(s, devices...); err != nil {
|
||||
return fmt.Errorf("CDI device injection failed: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user