public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-storage 1/2] fix #2822: add lvm, lvmthin & zfs storage on all cluster nodes
Date: Tue, 24 May 2022 16:45:30 +0200	[thread overview]
Message-ID: <20220524144532.2698959-2-s.hrdlicka@proxmox.com> (raw)
In-Reply-To: <20220524144532.2698959-1-s.hrdlicka@proxmox.com>

this enables forwarding of request to the correct node if a node is set

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
---
 PVE/API2/Storage/Config.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/PVE/API2/Storage/Config.pm b/PVE/API2/Storage/Config.pm
index 6bd770e..82b73ca 100755
--- a/PVE/API2/Storage/Config.pm
+++ b/PVE/API2/Storage/Config.pm
@@ -146,6 +146,13 @@ __PACKAGE__->register_method ({
     protected => 1,
     path => '',
     method => 'POST',
+    proxyto_callback => sub {
+	my ($rpcenv, $proxyto, $uri_param) = @_;
+	my $node = delete $uri_param->{node};
+	$node = "localhost" if !$node;
+
+	return $node;
+    },
     description => "Create a new storage.",
     permissions => {
 	check => ['perm', '/storage', ['Datastore.Allocate']],
-- 
2.30.2





  reply	other threads:[~2022-05-24 14:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 14:45 [pve-devel] [PATCH storage, manager 0/2] " Stefan Hrdlicka
2022-05-24 14:45 ` Stefan Hrdlicka [this message]
2022-06-07 12:54   ` [pve-devel] [PATCH pve-storage 1/2] " Fabian Ebner
2022-05-24 14:45 ` [pve-devel] [PATCH pve-manager 2/2] " Stefan Hrdlicka
2022-06-07 12:54   ` Fabian Ebner
2022-05-24 14:45 ` [pve-devel] [PATCH QQQ] fix #2822: enable node storage scanning for LVM, LVMThin & ZFS Stefan Hrdlicka
2022-05-24 14:58   ` Stefan Hrdlicka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220524144532.2698959-2-s.hrdlicka@proxmox.com \
    --to=s.hrdlicka@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal