Implement TopologyInfo and cpu_ids in podresources
It covers deviceplugin & cpumanager. It has drawback, since cpuset and all other structs including cadvisor's keep cpu as int, but for protobuf based interface is better to have fixed int. This patch also introduces additional interface CPUsProvider, while DeviceProvider might have been extended too. Checkpoint not covered by unit test. Signed-off-by: Swati Sehgal <swsehgal@redhat.com> Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
This commit is contained in:
@@ -43,6 +43,11 @@ func (m *mockProvider) GetDevices(podUID, containerName string) []*podresourcesv
|
||||
return args.Get(0).([]*podresourcesv1.ContainerDevices)
|
||||
}
|
||||
|
||||
func (m *mockProvider) GetCPUs(podUID, containerName string) []int64 {
|
||||
args := m.Called(podUID, containerName)
|
||||
return args.Get(0).([]int64)
|
||||
}
|
||||
|
||||
func (m *mockProvider) UpdateAllocatedDevices() {
|
||||
m.Called()
|
||||
}
|
||||
|
Reference in New Issue
Block a user