Commit Graph

6 Commits

Author SHA1 Message Date
Dominik Csapak
d958b1306f api: resource usb mapping: add missing proxyto_callback
i have added it to the pci api call, but forgot to add it for usb
otherwise adding a mapped usb device only works on the node where the
gui is connected to

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-21 12:51:47 +02:00
Thomas Lamprecht
dd6433ff1c api: mappings: cleanup perl imports
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 08:30:53 +02:00
Thomas Lamprecht
ebed76a242 api: PCI mappings: code/style cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 08:30:53 +02:00
Thomas Lamprecht
3a8bf3b613 api: PCI mappings: rename errors to checks in response
as it contains warnings too, so having it named errors might be
confusing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 08:30:53 +02:00
Thomas Lamprecht
d4830b941f api: PCI mappings: complete return schema
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-19 08:30:53 +02:00
Dominik Csapak
797bcf9aa2 api: add resource map api endpoints for PCI and USB
this adds the typical section config crud API calls for
USB and PCI resource mapping to /cluster/mapping/{TYPE}

the only special thing that this series does is the list call
for both has a special 'check-node' parameter that uses the
'proxyto_callback' to reroute the api call to the given node
so that it can check the validity of the mapping for that node

in the future when we e.g. broadcast the lspci output via pmxcfs
we drop the proxyto_callback and directly use the info from
pmxcfs (or we drop the parameter and always check all nodes)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-16 16:25:42 +02:00