@@ -50,6 +50,7 @@ const (
5050
5151// nvidiaDevicePlugin implements the Kubernetes device plugin API
5252type nvidiaDevicePlugin struct {
53+ pluginapi.UnimplementedDevicePluginServer
5354 ctx context.Context
5455 rm rm.ResourceManager
5556 config * spec.Config
@@ -305,10 +306,10 @@ func (plugin *nvidiaDevicePlugin) GetPreferredAllocation(ctx context.Context, r
305306func (plugin * nvidiaDevicePlugin ) Allocate (ctx context.Context , reqs * pluginapi.AllocateRequest ) (* pluginapi.AllocateResponse , error ) {
306307 responses := pluginapi.AllocateResponse {}
307308 for _ , req := range reqs .ContainerRequests {
308- if err := plugin .rm .ValidateRequest (req .DevicesIDs ); err != nil {
309+ if err := plugin .rm .ValidateRequest (req .DevicesIds ); err != nil {
309310 return nil , fmt .Errorf ("invalid allocation request for %q: %w" , plugin .rm .Resource (), err )
310311 }
311- response , err := plugin .getAllocateResponse (req .DevicesIDs )
312+ response , err := plugin .getAllocateResponse (req .DevicesIds )
312313 if err != nil {
313314 return nil , fmt .Errorf ("failed to get allocate response: %v" , err )
314315 }
@@ -399,7 +400,7 @@ func (plugin *nvidiaDevicePlugin) updateResponseForCDI(response *pluginapi.Conta
399400 cdiDevice := pluginapi.CDIDevice {
400401 Name : device ,
401402 }
402- response .CDIDevices = append (response .CDIDevices , & cdiDevice )
403+ response .CdiDevices = append (response .CdiDevices , & cdiDevice )
403404 }
404405 }
405406
0 commit comments