func (pdev podDevices) fromCheckpointData(data []checkpoint.PodDevicesEntry) {
	for _, entry := range data {
		klog.V(2).Infof("Get checkpoint entry: %v %v %v %v %v\n",
			entry.PodUID, entry.ContainerName, entry.ResourceName, entry.DeviceIDs, entry.AllocResp)
		devIDs := sets.NewString()
		for _, devID := range entry.DeviceIDs {
			devIDs.Insert(devID)
		}
		allocResp := &pluginapi.ContainerAllocateResponse{}
		err := allocResp.Unmarshal(entry.AllocResp)
		if err != nil {
			klog.Errorf("Can't unmarshal allocResp for %v %v %v: %v", entry.PodUID, entry.ContainerName, entry.ResourceName, err)
			continue
		}
		pdev.insert(entry.PodUID, entry.ContainerName, entry.ResourceName, devIDs, allocResp)
	}
}
// Populates podDevices from the passed in checkpointData.
Populates podDevices from the passed in checkpointData.
// Populates podDevices from the passed in checkpointData .
func (pdev podDevices) fromCheckpointData(data []checkpoint.PodDevicesEntry) {
	for _, entry := range data {
		klog.V(2).Infof("Get checkpoint entry: %v %v %v %v %v\n",
			entry.PodUID, entry.ContainerName, entry.ResourceName, entry.DeviceIDs, entry.AllocResp)
		devIDs := sets.NewString()
		for _, devID := range entry.DeviceIDs {
			devIDs.Insert(devID)
		}
		allocResp := &pluginapi.ContainerAllocateResponse{}
		err := allocResp.Unmarshal(entry.AllocResp)
		if err != nil {
			klog.Errorf("Can't unmarshal allocResp for %v %v %v: %v", entry.PodUID, entry.ContainerName, entry.ResourceName, err)
			continue
		}
		pdev.insert(entry.PodUID, entry.ContainerName, entry.ResourceName, devIDs, allocResp)
	}
}
func ( pdev podDevices ) fromCheckpointData ( data [ ] checkpoint . PodDevicesEntry ) { for _ , entry := range data { klog . V ( 2 ) . Infof ( " \n " , entry . PodUID , entry . ContainerName , entry . ResourceName , entry . DeviceIDs , entry . AllocResp ) devIDs := sets . NewString ( ) for _ , devID := range entry . DeviceIDs { devIDs . Insert ( devID ) } allocResp := & pluginapi . ContainerAllocateResponse { } err := allocResp . Unmarshal ( entry . AllocResp ) if err != nil { klog . Errorf ( " " , entry . PodUID , entry . ContainerName , entry . ResourceName , err ) continue } pdev . insert ( entry . PodUID , entry . ContainerName , entry . ResourceName , devIDs , allocResp ) } }
Populates podDevices from the passed in checkpointData.
Populates podDevices from the passed in checkpointData .