From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 57DA31FF183 for ; Wed, 24 Sep 2025 13:59:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6534E3961; Wed, 24 Sep 2025 13:59:53 +0200 (CEST) From: n.frey@proxmox.com To: pve-devel@lists.proxmox.com Date: Wed, 24 Sep 2025 13:59:01 +0200 Message-ID: <20250924115904.122696-2-n.frey@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20250924115904.122696-1-n.frey@proxmox.com> References: <20250924115904.122696-1-n.frey@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.007 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [acmeplugin.pm] Subject: [pve-devel] [PATCH pve-manager v2 1/4] api: add ACME plugin return schema X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" From: Nicolas Frey After looking at the code, I don't see any issues with using the createSchema method. Additionally tested by comparing the output of: - pvesh usage /cluster/acme/plugins --returns - pvesh get /cluster/acme/plugins confirmed that the contents match. Signed-off-by: Nicolas Frey --- PVE/API2/ACMEPlugin.pm | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/PVE/API2/ACMEPlugin.pm b/PVE/API2/ACMEPlugin.pm index 510101aa..d52bc90b 100644 --- a/PVE/API2/ACMEPlugin.pm +++ b/PVE/API2/ACMEPlugin.pm @@ -50,6 +50,8 @@ my $modify_cfg_for_api = sub { return $plugin_cfg; }; +my $acme_challenge_type = PVE::ACME::Challenge->createSchema(); + __PACKAGE__->register_method({ name => 'index', path => '', @@ -72,12 +74,7 @@ __PACKAGE__->register_method({ }, returns => { type => 'array', - items => { - type => "object", - properties => { - plugin => get_standard_option('pve-acme-pluginid'), - }, - }, + items => $acme_challenge_type, links => [{ rel => 'child', href => "{plugin}" }], }, code => sub { @@ -111,9 +108,7 @@ __PACKAGE__->register_method({ id => get_standard_option('pve-acme-pluginid'), }, }, - returns => { - type => 'object', - }, + returns => $acme_challenge_type, code => sub { my ($param) = @_; @@ -131,7 +126,7 @@ __PACKAGE__->register_method({ check => ['perm', '/', ['Sys.Modify']], }, protected => 1, - parameters => PVE::ACME::Challenge->createSchema(), + parameters => $acme_challenge_type, returns => { type => "null", }, -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel