public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-manager 0/5] api: add return schemas and fix grammar in ifupdown2 error message
@ 2025-09-19  9:33 n.frey
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 1/5] Fix grammar in ifupdown2 version " n.frey
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: n.frey @ 2025-09-19  9:33 UTC (permalink / raw)
  To: pve-devel

From: Nicolas Frey <n.frey@proxmox.com>

Adds return schemas for various API endpoints (for documentation purposes) and fixes a minor grammar issue.

Nicolas Frey (5):
  Fix grammar in ifupdown2 version error message
  api: add ACME plugin return schema
  api: add APT versions return schema
  api: add service state return schema
  api: add replication config read return schema

 PVE/API2/ACMEPlugin.pm        | 49 ++++++++++++++++++++++++++++
 PVE/API2/APT.pm               | 61 ++++++++++++++++++++++++++++++++++-
 PVE/API2/Network.pm           |  2 +-
 PVE/API2/ReplicationConfig.pm |  2 +-
 PVE/API2/Services.pm          | 30 ++++++++++++++++-
 5 files changed, 140 insertions(+), 4 deletions(-)

-- 
2.47.3


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* [pve-devel] [PATCH pve-manager 1/5] Fix grammar in ifupdown2 version error message
  2025-09-19  9:33 [pve-devel] [PATCH pve-manager 0/5] api: add return schemas and fix grammar in ifupdown2 error message n.frey
@ 2025-09-19  9:33 ` n.frey
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 2/5] api: add ACME plugin return schema n.frey
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: n.frey @ 2025-09-19  9:33 UTC (permalink / raw)
  To: pve-devel

From: Nicolas Frey <n.frey@proxmox.com>

Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
---
 PVE/API2/Network.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 7fb7667e..fc053fec 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -873,7 +873,7 @@ sub assert_ifupdown2_installed {
     die "you need ifupdown2 to reload network configuration\n" if !-e '/usr/share/ifupdown2';
     my ($v, $pve, $v_str) = ifupdown2_version();
     die
-        "incompatible 'ifupdown2' package version '$v_str'! Did you installed from Proxmox repositories?\n"
+        "incompatible 'ifupdown2' package version '$v_str'! Did you install from Proxmox repositories?\n"
         if $v < (1 * 100000 + 2 * 1000 + 8 * 10) || !$pve;
 }
 
-- 
2.47.3


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* [pve-devel] [PATCH pve-manager 2/5] api: add ACME plugin return schema
  2025-09-19  9:33 [pve-devel] [PATCH pve-manager 0/5] api: add return schemas and fix grammar in ifupdown2 error message n.frey
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 1/5] Fix grammar in ifupdown2 version " n.frey
@ 2025-09-19  9:33 ` n.frey
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 3/5] api: add APT versions " n.frey
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: n.frey @ 2025-09-19  9:33 UTC (permalink / raw)
  To: pve-devel

From: Nicolas Frey <n.frey@proxmox.com>

Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
---
 PVE/API2/ACMEPlugin.pm | 49 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/PVE/API2/ACMEPlugin.pm b/PVE/API2/ACMEPlugin.pm
index 510101aa..b67cb1ff 100644
--- a/PVE/API2/ACMEPlugin.pm
+++ b/PVE/API2/ACMEPlugin.pm
@@ -76,6 +76,29 @@ __PACKAGE__->register_method({
             type => "object",
             properties => {
                 plugin => get_standard_option('pve-acme-pluginid'),
+                'validation-delay' => {
+                    type => 'integer',
+                    description => 'Waiting period after a DNS record is created.',
+                    default => 30,
+                    optional => 1
+                },
+                data => {
+                    type => 'string',
+                    description => 'Additional data like keys, server, url etc.',
+                    optional => 1
+                },
+                api => {
+                    type => 'string',
+                    description => 'One of the DNS APIs listed in /json/cluster/challenge-schema.'
+                },
+                digest => {
+                    type => 'string',
+                    description => 'Digest to detect modification.'
+                },
+                type => {
+                    type => 'string',
+                    description => ''
+                },
             },
         },
         links => [{ rel => 'child', href => "{plugin}" }],
@@ -113,6 +136,32 @@ __PACKAGE__->register_method({
     },
     returns => {
         type => 'object',
+        properties => {
+            plugin => get_standard_option('pve-acme-pluginid'),
+            'validation-delay' => {
+                type => 'integer',
+                description => 'Waiting period after a DNS record is created.',
+                default => 30,
+                optional => 1
+            },
+            data => {
+                type => 'string',
+                description => 'Additional data like keys, server, url etc.',
+                optional => 1
+            },
+            api => {
+                type => 'string',
+                description => 'One of the DNS APIs listed in /json/cluster/challenge-schema.'
+            },
+            digest => {
+                type => 'string',
+                description => ''
+            },
+            type => {
+                type => 'string',
+                description => ''
+            },
+        },
     },
     code => sub {
         my ($param) = @_;
-- 
2.47.3


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* [pve-devel] [PATCH pve-manager 3/5] api: add APT versions return schema
  2025-09-19  9:33 [pve-devel] [PATCH pve-manager 0/5] api: add return schemas and fix grammar in ifupdown2 error message n.frey
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 1/5] Fix grammar in ifupdown2 version " n.frey
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 2/5] api: add ACME plugin return schema n.frey
@ 2025-09-19  9:33 ` n.frey
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 4/5] api: add service state " n.frey
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 5/5] api: add replication config read " n.frey
  4 siblings, 0 replies; 6+ messages in thread
From: n.frey @ 2025-09-19  9:33 UTC (permalink / raw)
  To: pve-devel

From: Nicolas Frey <n.frey@proxmox.com>

Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
---
 PVE/API2/APT.pm | 61 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 60 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm
index 0d07cf38..9a8406a8 100644
--- a/PVE/API2/APT.pm
+++ b/PVE/API2/APT.pm
@@ -788,7 +788,66 @@ __PACKAGE__->register_method({
         type => "array",
         items => {
             type => "object",
-            properties => {},
+            properties => {
+                'Arch' => {
+                    type => 'string',
+                    description => 'Package Architecture.',
+                },
+                'Description' => {
+                    type => 'string',
+                    description => 'Human-readable package description.',
+                },
+                'NotifyStatus' => {
+                    type => 'string',
+                    description =>
+                        'Version for which PVE has already sent an update notification for.',
+                    optional => 1,
+                },
+                'OldVersion' => {
+                    type => 'string',
+                    description => 'Old version currently installed.',
+                    optional => 1,
+                },
+                'Origin' => {
+                    type => 'string',
+                    description => 'Package origin.',
+                },
+                'Package' => {
+                    type => 'string',
+                    description => 'Package name.',
+                },
+                'Priority' => {
+                    type => 'string',
+                    description => 'Package priority in human-readable form.',
+                },
+                'Section' => {
+                    type => 'string',
+                    description => 'Package section.',
+                },
+                'Title' => {
+                    type => 'string',
+                    description => 'Package title.',
+                },
+                'Version' => {
+                    type => 'string',
+                    description => 'New version to be updated to.',
+                },
+                'CurrentState' => {
+                    type => 'string',
+                    description => 'Whether the Package is installed.',
+                    format => '',
+                },
+                'RunningKernel' => {
+                    type => 'string',
+                    description => 'Kernel Release, only for Package "Proxmox Virtual Environment".',
+                    optional => 1,
+                },
+                'ManagerVersion' => {
+                    type => 'string',
+                    description => 'Proxmox Virtual Environment Management Tools.',
+                    optional => 1,
+                }
+            },
         },
     },
     code => sub {
-- 
2.47.3


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* [pve-devel] [PATCH pve-manager 4/5] api: add service state return schema
  2025-09-19  9:33 [pve-devel] [PATCH pve-manager 0/5] api: add return schemas and fix grammar in ifupdown2 error message n.frey
                   ` (2 preceding siblings ...)
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 3/5] api: add APT versions " n.frey
@ 2025-09-19  9:33 ` n.frey
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 5/5] api: add replication config read " n.frey
  4 siblings, 0 replies; 6+ messages in thread
From: n.frey @ 2025-09-19  9:33 UTC (permalink / raw)
  To: pve-devel

From: Nicolas Frey <n.frey@proxmox.com>

Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
---
 PVE/API2/Services.pm | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Services.pm b/PVE/API2/Services.pm
index 708b6613..c8e3e933 100644
--- a/PVE/API2/Services.pm
+++ b/PVE/API2/Services.pm
@@ -241,7 +241,35 @@ __PACKAGE__->register_method({
     },
     returns => {
         type => "object",
-        properties => {},
+        properties => {
+            'active-state' => {
+                type => 'string',
+                enum => ['active', 'inactive', 'unknown'],
+                description => 'Current active state of the service process.',
+            },
+            'state' => {
+                type => 'string',
+                enum => ['running', 'dead', 'unknown'],
+                description => 'Execution status of the service.',
+            },
+            'unit-state' => {
+                type => 'string',
+                enum => ['enabled', 'disabled', 'not-found'],
+                description => 'Whether the service is enabled to start at boot.',
+            },
+            'service' => {
+                type => 'string',
+                description => 'Systemd unit name (e.g., pveproxy).',
+            },
+            'name' => {
+                type => 'string',
+                description => 'Short identifier for the service (e.g., "pveproxy").',
+            },
+            'desc' => {
+                type => 'string',
+                description => 'Human-readable description of the service.',
+            },
+        },
     },
     code => sub {
         my ($param) = @_;
-- 
2.47.3


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* [pve-devel] [PATCH pve-manager 5/5] api: add replication config read return schema
  2025-09-19  9:33 [pve-devel] [PATCH pve-manager 0/5] api: add return schemas and fix grammar in ifupdown2 error message n.frey
                   ` (3 preceding siblings ...)
  2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 4/5] api: add service state " n.frey
@ 2025-09-19  9:33 ` n.frey
  4 siblings, 0 replies; 6+ messages in thread
From: n.frey @ 2025-09-19  9:33 UTC (permalink / raw)
  To: pve-devel

From: Nicolas Frey <n.frey@proxmox.com>

Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
---
 PVE/API2/ReplicationConfig.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/ReplicationConfig.pm b/PVE/API2/ReplicationConfig.pm
index 307ebe69..515afcec 100644
--- a/PVE/API2/ReplicationConfig.pm
+++ b/PVE/API2/ReplicationConfig.pm
@@ -75,7 +75,7 @@ __PACKAGE__->register_method({
             id => get_standard_option('pve-replication-id'),
         },
     },
-    returns => { type => 'object' },
+    returns => PVE::ReplicationConfig->createSchema(),
     code => sub {
         my ($param) = @_;
 
-- 
2.47.3


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

end of thread, other threads:[~2025-09-19  9:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-19  9:33 [pve-devel] [PATCH pve-manager 0/5] api: add return schemas and fix grammar in ifupdown2 error message n.frey
2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 1/5] Fix grammar in ifupdown2 version " n.frey
2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 2/5] api: add ACME plugin return schema n.frey
2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 3/5] api: add APT versions " n.frey
2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 4/5] api: add service state " n.frey
2025-09-19  9:33 ` [pve-devel] [PATCH pve-manager 5/5] api: add replication config read " n.frey

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