all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/2] api: subscription: add return schema for 'GET' api
Date: Mon, 21 Oct 2024 11:15:41 +0200	[thread overview]
Message-ID: <20241021091542.1017657-4-d.csapak@proxmox.com> (raw)
In-Reply-To: <20241021091542.1017657-1-d.csapak@proxmox.com>

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 <d.csapak@proxmox.com>
---
 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


  parent reply	other threads:[~2024-10-21  9:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21  9:15 [pve-devel] [PATCH qemu-server/container/manager] add some missing return schema descriptions Dominik Csapak
2024-10-21  9:15 ` [pve-devel] [PATCH qemu-server 1/1] status: add some missing description for status return properties Dominik Csapak
2024-10-24 13:53   ` [pve-devel] applied: " Thomas Lamprecht
2024-10-21  9:15 ` [pve-devel] [PATCH container 1/1] status: add some missing descriptions " Dominik Csapak
2024-10-24 12:20   ` [pve-devel] applied: " Thomas Lamprecht
2024-10-24 15:05     ` Dominik Csapak
2024-10-24 15:12       ` Thomas Lamprecht
2024-10-21  9:15 ` Dominik Csapak [this message]
2024-10-24 15:02   ` [pve-devel] applied: [PATCH manager 1/2] api: subscription: add return schema for 'GET' api Thomas Lamprecht
2024-10-21  9:15 ` [pve-devel] [PATCH manager 2/2] api: cluster/resources: add missing return properties Dominik Csapak
2024-10-24 15:02   ` [pve-devel] applied: " Thomas Lamprecht

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=20241021091542.1017657-4-d.csapak@proxmox.com \
    --to=d.csapak@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 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