mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-11-03 12:02:29 +00:00
Currently, when we have a PCI resource mapping, we manually check only the available models for the first PCI entry. This often works, but not always, since one could have completely different devices in one mapping, or with the new NVIDIA sysfs api we don't get the generally available models. To improve this, extend the parameter for the PCI ID to accept both, PCI IDs or named mappings, and for the latter mappings, iterate over all local PCI devices in it and extract the mdev types. Rename also the parameter to better reflect what it accepts. While the this is changing a API parameter, it's not a breaking change in this specific case because the parameter is derived from the URL path, and any attempt to include the parameter with a name manually is not possible and will result in an error: duplicate parameter (already defined in URI) with conflicting values! Since we cannot reach the API handler without giving the parameter already via the URL, there is no way to give it via name. Accepting named mappings directly in this API endpoint also vastly simplifies the UI code, since we now only have to give the mapping to the selector instead of an (arbitrarily selected) PCI id from that mapping. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> [ TL: also split pciid into pci-id for readability and reword message slightly ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> |
||
|---|---|---|
| .. | ||
| Makefile | ||
| PCI.pm | ||
| USB.pm | ||