mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 20:00:07 +00:00
DRA: Rename GetBaseDeviceID to GetDeviceID for SharedDeviceID
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com>
This commit is contained in:
@@ -301,7 +301,7 @@ func (c *claimTracker) GatherAllocatedState() (*structured.AllocatedState, error
|
||||
// This ensures backward compatibility with the original DRA behavior where devices
|
||||
// could only be allocated exclusively to a single claim.
|
||||
for sharedDeviceID := range allocatedSharedDeviceIDs {
|
||||
allocated.Insert(sharedDeviceID.GetBaseDeviceID())
|
||||
allocated.Insert(sharedDeviceID.GetDeviceID())
|
||||
}
|
||||
// Reset allocatedSharedDeviceIDs and aggregatedCapacity
|
||||
allocatedSharedDeviceIDs = sets.New[structured.SharedDeviceID]()
|
||||
|
||||
@@ -58,7 +58,7 @@ func (d SharedDeviceID) String() string {
|
||||
return deviceIDStr
|
||||
}
|
||||
|
||||
func (d SharedDeviceID) GetBaseDeviceID() DeviceID {
|
||||
func (d SharedDeviceID) GetDeviceID() DeviceID {
|
||||
return MakeDeviceID(d.Driver.String(), d.Pool.String(), d.Device.String())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user