MCPcopy
hub / github.com/NVIDIA/k8s-device-plugin / Contains

Method Contains

internal/rm/devices.go:107–114  ·  view source on GitHub ↗

Contains checks if Devices contains devices matching all ids.

(ids ...string)

Source from the content-addressed store, hash-verified

105
106// Contains checks if Devices contains devices matching all ids.
107func (ds Devices) Contains(ids ...string) bool {
108 for _, id := range ids {
109 if _, exists := ds[id]; !exists {
110 return false
111 }
112 }
113 return true
114}
115
116// GetByID returns a reference to the device matching the specified ID (nil otherwise).
117func (ds Devices) GetByID(id string) *Device {

Callers 8

SubsetMethod · 0.95
DifferenceMethod · 0.80
IsMigDeviceMethod · 0.80
ValidateRequestMethod · 0.80
CreateSpecFileMethod · 0.80
TestMigStrategyMixedFunction · 0.80
checkResultFunction · 0.80
cleanupNodeFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestMigStrategyMixedFunction · 0.64
checkResultFunction · 0.64
cleanupNodeFunction · 0.64