func SpecsForDevices()

in plugins/internal/mount/device_mounts.go [15:30]


func SpecsForDevices(devices []*discovery.Device) []*pluginapi.DeviceSpec {

	specs := []*pluginapi.DeviceSpec{}

	// Provide the physical location path for each device, avoiding duplicates (duplicate paths can occur when
	// multitenancy is enabled and two requested device IDs map to the same underlying physical device)
	for _, device := range devices {
		specs = appendUniqueSpec(specs, &pluginapi.DeviceSpec{
			HostPath:      "vpci-location-path://" + device.LocationPath,
			ContainerPath: "",
			Permissions:   "",
		})
	}

	return specs
}