]> git.proxmox.com Git - pve-manager.git/commit
api: add resource map api endpoints for PCI and USB
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 16 Jun 2023 13:05:28 +0000 (15:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 16 Jun 2023 14:25:42 +0000 (16:25 +0200)
commit797bcf9aa292478ddf85354354a69c3751a01aad
tree5a73d6066f0fabada62bd2dba3ebcf40887be0e6
parent0fe0a2dd2b8e6dcc0cfec8a28c8f2fa498a2650e
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>
PVE/API2/Cluster.pm
PVE/API2/Cluster/Makefile
PVE/API2/Cluster/Mapping.pm [new file with mode: 0644]
PVE/API2/Cluster/Mapping/Makefile [new file with mode: 0644]
PVE/API2/Cluster/Mapping/PCI.pm [new file with mode: 0644]
PVE/API2/Cluster/Mapping/USB.pm [new file with mode: 0644]
PVE/API2/Hardware.pm