all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] api: resource usb mapping: add missing proxyto_callback
@ 2023-06-21 10:05 Dominik Csapak
  2023-06-21 10:52 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2023-06-21 10:05 UTC (permalink / raw)
  To: pve-devel

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>
---
 PVE/API2/Cluster/Mapping/USB.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/PVE/API2/Cluster/Mapping/USB.pm b/PVE/API2/Cluster/Mapping/USB.pm
index 5495bce2..763d5c2b 100644
--- a/PVE/API2/Cluster/Mapping/USB.pm
+++ b/PVE/API2/Cluster/Mapping/USB.pm
@@ -15,6 +15,11 @@ __PACKAGE__->register_method ({
     name => 'index',
     path => '',
     method => 'GET',
+    # only proxy if we give the 'check-node' parameter
+    proxyto_callback => sub {
+	my ($rpcenv, $proxyto, $param) = @_;
+	return $param->{'check-node'} // 'localhost';
+    },
     description => "List USB Hardware Mappings",
     permissions => {
 	description => "Only lists entries where you have 'Mapping.Modify', 'Mapping.Use' or".
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH manager] api: resource usb mapping: add missing proxyto_callback
  2023-06-21 10:05 [pve-devel] [PATCH manager] api: resource usb mapping: add missing proxyto_callback Dominik Csapak
@ 2023-06-21 10:52 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-06-21 10:52 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 21/06/2023 um 12:05 schrieb Dominik Csapak:
> 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>
> ---
>  PVE/API2/Cluster/Mapping/USB.pm | 5 +++++
>  1 file changed, 5 insertions(+)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-21 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 10:05 [pve-devel] [PATCH manager] api: resource usb mapping: add missing proxyto_callback Dominik Csapak
2023-06-21 10:52 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal