all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager v2 2/6] fix: node: add missing `uptime` property inside the return schema
Date: Wed,  2 Sep 2026 16:59:40 +0200	[thread overview]
Message-ID: <20260902145944.365185-3-s.shaji@proxmox.com> (raw)
In-Reply-To: <20260902145944.365185-1-s.shaji@proxmox.com>

Earlier, the uptime property was not defined inside the return schema.
Because of this, the API types defined inside the pve-api-types crate
didn't have the uptime property. In order to access the `uptime` property
inside another Rust project, the `additional_properties` map had to be
used. To fix this, add uptime property to the return schema.

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
 PVE/API2/Nodes.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 603f4a06..627e7a2a 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -369,6 +369,12 @@ __PACKAGE__->register_method({
         additionalProperties => 1,
         properties => {
             # TODO: document remaining ones
+            uptime => {
+                type => "integer",
+                minimum => 0,
+                description =>
+                    "The uptime of the system (including time spent in suspend), in seconds.",
+            },
             idle => {
                 type => "integer",
                 minimum => 0,
-- 
2.47.3





  parent reply	other threads:[~2026-09-02 15:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 14:59 [PATCH manager/proxmox{-yew-comp,} v2 0/6] add missing uptime to the GUI, update API dump, and regenerate pve-api-types Shan Shaji
2026-09-02 14:59 ` [PATCH pve-manager v2 1/6] fix: nodes: update `idle` key value in hash reference Shan Shaji
2026-09-02 14:59 ` Shan Shaji [this message]
2026-09-02 14:59 ` [PATCH proxmox-yew-comp v2 3/6] fix #7932: add missing uptime to the GUI Shan Shaji
2026-09-02 14:59 ` [PATCH proxmox v2 4/6] chore: pve-api-types: update API dump and regenerate types Shan Shaji
2026-09-02 14:59 ` [PATCH proxmox v2 5/6] pve-api-types: register missing pve-fw-comment-spec verify function Shan Shaji
2026-09-02 14:59 ` [PATCH proxmox v2 6/6] pve-api-types: update API dump for /node/status and regenerate types Shan Shaji

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=20260902145944.365185-3-s.shaji@proxmox.com \
    --to=s.shaji@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