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 CE2AC1FF15F for ; Mon, 21 Oct 2024 11:15:10 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BC22430A01; Mon, 21 Oct 2024 11:15:45 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Mon, 21 Oct 2024 11:15:41 +0200 Message-Id: <20241021091542.1017657-4-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241021091542.1017657-1-d.csapak@proxmox.com> References: <20241021091542.1017657-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.015 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 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. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager 1/2] api: subscription: add return schema for 'GET' api 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" This was missing, but it mostly well defined since we're using the rust bindings here. I copied most descriptions over from the PBS api, except the ones only existing here (like sockets and level) Signed-off-by: Dominik Csapak --- PVE/API2/Subscription.pm | 67 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Subscription.pm b/PVE/API2/Subscription.pm index 9e5459e4..49286a05 100644 --- a/PVE/API2/Subscription.pm +++ b/PVE/API2/Subscription.pm @@ -120,7 +120,72 @@ __PACKAGE__->register_method ({ node => get_standard_option('pve-node'), }, }, - returns => { type => 'object'}, + returns => { + type => 'object', + additionalProperties => 0, + properties => { + status => { + type => 'string', + enum => [qw(new notfound active invalid expired suspended)], + description => "The current subscription status.", + }, + checktime => { + type => 'integer', + description => 'Timestamp of the last check done.', + optional => 1, + }, + key => { + type => 'string', + description => 'The subscription key, if set and permitted to access.', + optional => 1, + }, + level => { + type => 'string', + description => 'A short code for the subscription level.', + optional => 1, + }, + message => { + type => 'string', + description => 'A more human readable status message.', + optional => 1, + }, + nextduedate => { + type => 'string', + description => 'Next due date of the set subscription.', + optional => 1, + }, + productname => { + type => 'string', + description => 'Human readable productname of the set subscription.', + optional => 1, + }, + regdate => { + type => 'string', + description => 'Register date of the set subscription.', + optional => 1, + }, + serverid => { + type => 'string', + description => 'The server ID, if permitted to access.', + optional => 1, + }, + signature => { + type => 'string', + description => 'Signature for offline keys', + optional => 1, + }, + sockets => { + type => 'integer', + description => 'The number of sockets for this host.', + optional => 1, + }, + url => { + type => 'string', + description => 'URL to the web shop.', + optional => 1, + }, + }, + }, code => sub { my ($param) = @_; -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel