* [PATCH manager/proxmox{-yew-comp,} v2 0/6] add missing uptime to the GUI, update API dump, and regenerate pve-api-types
@ 2026-09-02 14:59 Shan Shaji
2026-09-02 14:59 ` [PATCH pve-manager v2 1/6] fix: nodes: update `idle` key value in hash reference Shan Shaji
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Shan Shaji @ 2026-09-02 14:59 UTC (permalink / raw)
To: pve-devel
This series adds missing uptime [0] to the GUI. I have also updated the API
dump and regenerated the types after adding the missing idle and
uptime properties to the return schema of Proxmox VE's /nodes/{node}/status
endpoint. This also fixes an issue where the idle field always returned 0.
Apart from patch [3/6], all other patches are new.
Changes since v1: [1] Thanks @Dominik
- fix white space after "="
- fix idle property always returns 0.
- add idle property to the return schema.
- add uptime to the return schema.
- update API dump and regenerate types.
For the firewall comment format/verify function took reference from the
following patch [2].
- [0] https://man7.org/linux/man-pages/man5/proc_uptime.5.html
- [1] https://lore.proxmox.com/yew-devel/DKYYDNGIAVMV.2WF3ZBQW0OMTW@proxmox.com/T/#t
- [2] https://lore.proxmox.com/pve-devel/20260715093432.34437-1-s.hanreich@proxmox.com/T/#u
pve-manager:
Shan Shaji (2):
fix: nodes: update `idle` key value in hash reference
fix: node: add missing `uptime` property inside the return schema
PVE/API2/Nodes.pm | 12 ++++++++++++
1 file changed, 12 insertions(+)
proxmox-yew-comp:
Shan Shaji (1):
fix #7932: add missing uptime to the GUI
src/node_status_panel.rs | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
proxmox:
Shan Shaji (3):
chore: pve-api-types: update API dump and regenerate types
pve-api-types: register missing pve-fw-comment-spec verify function
pve-api-types: update API dump for /node/status and regenerate types
pve-api-types/generate.pl | 2 +-
pve-api-types/pve-api.json | 695 +++++++++++++++++++++------
pve-api-types/src/generated/code.rs | 3 +
pve-api-types/src/generated/types.rs | 36 +-
pve-api-types/src/types/verifiers.rs | 9 +
5 files changed, 584 insertions(+), 161 deletions(-)
Summary over all repositories:
7 files changed, 615 insertions(+), 163 deletions(-)
--
Generated by murpp 0.10.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH pve-manager v2 1/6] fix: nodes: update `idle` key value in hash reference
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 ` Shan Shaji
2026-09-02 14:59 ` [PATCH pve-manager v2 2/6] fix: node: add missing `uptime` property inside the return schema Shan Shaji
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Shan Shaji @ 2026-09-02 14:59 UTC (permalink / raw)
To: pve-devel
Previously, the /status endpoint returned 0 for the `idle` field because
the idle value read from /proc/uptime was not being used to update the
hash reference.
Fix this by setting the hash reference's `idle` key to the parsed value.
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 2ca3244d..603f4a06 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -369,6 +369,11 @@ __PACKAGE__->register_method({
additionalProperties => 1,
properties => {
# TODO: document remaining ones
+ idle => {
+ type => "integer",
+ minimum => 0,
+ description => "Sum of how much time each core has spent idle, in seconds.",
+ },
'boot-info' => {
description => "Meta-information about the boot mode.",
type => 'object',
@@ -500,6 +505,7 @@ __PACKAGE__->register_method({
my ($uptime, $idle) = PVE::ProcFSTools::read_proc_uptime();
$res->{uptime} = $uptime;
+ $res->{idle} = $idle;
my ($avg1, $avg5, $avg15) = PVE::ProcFSTools::read_loadavg();
$res->{loadavg} = [$avg1, $avg5, $avg15];
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH pve-manager v2 2/6] fix: node: add missing `uptime` property inside the return schema
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
2026-09-02 14:59 ` [PATCH proxmox-yew-comp v2 3/6] fix #7932: add missing uptime to the GUI Shan Shaji
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Shan Shaji @ 2026-09-02 14:59 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH proxmox-yew-comp v2 3/6] fix #7932: add missing uptime to the GUI
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 ` [PATCH pve-manager v2 2/6] fix: node: add missing `uptime` property inside the return schema Shan Shaji
@ 2026-09-02 14:59 ` Shan Shaji
2026-09-02 14:59 ` [PATCH proxmox v2 4/6] chore: pve-api-types: update API dump and regenerate types Shan Shaji
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Shan Shaji @ 2026-09-02 14:59 UTC (permalink / raw)
To: pve-devel
Previously, the uptime was not displayed in Proxmox Datacenter Manager.
This fixes the issue by wiring the property already available from
the /status endpoint into the UI.
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
src/node_status_panel.rs | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/node_status_panel.rs b/src/node_status_panel.rs
index ec17a94..7e5c6e7 100644
--- a/src/node_status_panel.rs
+++ b/src/node_status_panel.rs
@@ -8,13 +8,13 @@ use pwt::widget::form::DisplayField;
use yew::virtual_dom::{VComp, VNode};
use pwt::prelude::*;
-use pwt::widget::{error_message, Fa, Panel, Row, Tooltip};
+use pwt::widget::{Container, Fa, Panel, Row, Tooltip, error_message};
use pwt::widget::{Button, Dialog};
use pwt_macros::builder;
use proxmox_node_status::{NodePowerCommand, NodeStatus};
-use crate::utils::copy_text_to_clipboard;
+use crate::utils::{copy_text_to_clipboard, format_duration_human};
use crate::{
http_get, http_post, node_info, ConfirmButton, LoadableComponent, LoadableComponentContext,
LoadableComponentMaster, LoadableComponentScopeExt, LoadableComponentState,
@@ -146,6 +146,22 @@ impl ProxmoxNodeStatusPanel {
}
}
+fn uptime_html(node_status: Option<&node_info::NodeStatus>) -> Option<Html> {
+ let uptime = match node_status {
+ Some(node_info::NodeStatus::Pve(node_status)) => node_status.uptime,
+ Some(node_info::NodeStatus::Pbs(node_status)) => node_status.uptime,
+ Some(node_info::NodeStatus::Common(node_status)) => node_status.uptime,
+ None => 0
+ };
+
+ if uptime == 0 {
+ return None;
+ }
+
+ let uptime_string = tr!("(Uptime: {})", format_duration_human(uptime as f64));
+ Some(Container::from_tag("span").with_child(uptime_string).into())
+}
+
impl LoadableComponent for ProxmoxNodeStatusPanel {
type Message = Msg;
type ViewState = ViewState;
@@ -229,6 +245,7 @@ impl LoadableComponent for ProxmoxNodeStatusPanel {
.gap(2)
.with_child(Fa::new("book"))
.with_child(tr!("Node Status"))
+ .with_optional_child(uptime_html(status.as_ref()))
.into_html(),
)
.with_child(node_info(status))
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH proxmox v2 4/6] chore: pve-api-types: update API dump and regenerate types
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
` (2 preceding siblings ...)
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 ` 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
5 siblings, 0 replies; 7+ messages in thread
From: Shan Shaji @ 2026-09-02 14:59 UTC (permalink / raw)
To: pve-devel
API dump was outdated. Regenerate it.
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
pve-api-types/pve-api.json | 660 ++++++++++++++++++++-------
pve-api-types/src/generated/code.rs | 3 +
pve-api-types/src/generated/types.rs | 12 +-
3 files changed, 515 insertions(+), 160 deletions(-)
diff --git a/pve-api-types/pve-api.json b/pve-api-types/pve-api.json
index 0ac4072c..36ba0b07 100644
--- a/pve-api-types/pve-api.json
+++ b/pve-api-types/pve-api.json
@@ -150,7 +150,6 @@
"pve-fw-sport-spec": ("Code")[],
"pve-groupid": ("Code")[],
"pve-ha-node": ("Code")[],
- "pve-ha-resource-id": ("Code")[],
"pve-ha-resource-or-vm-id": ("Code")[],
"pve-hotplug-features": ("Code")[],
"pve-iface": ("Code")[],
@@ -8470,94 +8469,136 @@
"method": "PUT",
"name": "update_rule",
"parameters": {
- "additionalProperties": 0,
- "properties": {
- "affinity": {
- "description": "Describes whether the HA resources are supposed to be kept on the same node ('positive'), or are supposed to be kept on separate nodes ('negative').",
- "enum": [
- "positive",
- "negative"
+ "allOf": [
+ {
+ "additionalProperties": 0,
+ "properties": {
+ "delete": {
+ "description": "A list of settings you want to delete.",
+ "format": "pve-configid-list",
+ "maxLength": 4096,
+ "optional": 1,
+ "type": "string"
+ },
+ "digest": {
+ "description": "Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.",
+ "maxLength": 64,
+ "optional": 1,
+ "type": "string"
+ }
+ }
+ },
+ {
+ "additionalProperties": 0,
+ "properties": {
+ "rule": {
+ "completion": ("Code")[],
+ "description": "HA rule identifier.",
+ "format": "pve-configid",
+ "optional": 0,
+ "type": "string"
+ }
+ }
+ },
+ {
+ "oneOf": [
+ {
+ "additionalProperties": 0,
+ "instance-type": "node-affinity",
+ "properties": {
+ "affinity": {
+ "default": "positive",
+ "description": "Describes whether the HA resources are supposed to be placed on the given nodes ('positive'), or are supposed to be placed on any but the given nodes ('negative').",
+ "enum": [
+ "positive",
+ "negative"
+ ],
+ "optional": 1,
+ "type": "string"
+ },
+ "comment": {
+ "description": "HA rule description.",
+ "maxLength": 4096,
+ "optional": 1,
+ "type": "string"
+ },
+ "disable": {
+ "description": "Whether the HA rule is disabled.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "nodes": {
+ "completion": ("Code")[],
+ "description": "List of cluster node names with optional priority.",
+ "format": "pve-ha-node-list",
+ "optional": 1,
+ "type": "string",
+ "typetext": "<node>[:<pri>]{,<node>[:<pri>]}*",
+ "verbose_description": "List of cluster node members, where a priority can be given to each node. A resource will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the resources will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
+ },
+ "resources": {
+ "completion": ("Code")[],
+ "description": "List of HA resource IDs. This consists of a list of resource types followed by a resource specific name separated with a colon (example: vm:100,ct:101).",
+ "format": "pve-ha-resource-id-list",
+ "optional": 1,
+ "type": "string",
+ "typetext": "<type>:<name>{,<type>:<name>}*"
+ },
+ "strict": {
+ "default": 0,
+ "description": "Describes whether the node affinity rule is strict or non-strict.",
+ "optional": 1,
+ "type": "boolean",
+ "verbose_description": "Describes whether the node affinity rule is strict or non-strict.\n\nA non-strict node affinity rule makes resources prefer to be on the defined nodes.\nIf none of the defined nodes are available, the resource may run on any other node.\n\nA strict node affinity rule makes resources be restricted to the defined nodes. If\nnone of the defined nodes are available, the resource will be stopped.\n"
+ }
+ }
+ },
+ {
+ "additionalProperties": 0,
+ "instance-type": "resource-affinity",
+ "properties": {
+ "affinity": {
+ "description": "Describes whether the HA resources are supposed to be kept on the same node ('positive'), or are supposed to be kept on separate nodes ('negative').",
+ "enum": [
+ "positive",
+ "negative"
+ ],
+ "optional": 1,
+ "type": "string"
+ },
+ "comment": {
+ "description": "HA rule description.",
+ "maxLength": 4096,
+ "optional": 1,
+ "type": "string"
+ },
+ "disable": {
+ "description": "Whether the HA rule is disabled.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "resources": {
+ "completion": ("Code")[],
+ "description": "List of HA resource IDs. This consists of a list of resource types followed by a resource specific name separated with a colon (example: vm:100,ct:101).",
+ "format": "pve-ha-resource-id-list",
+ "optional": 1,
+ "type": "string",
+ "typetext": "<type>:<name>{,<type>:<name>}*"
+ }
+ }
+ }
],
- "instance-types": [
- "resource-affinity"
- ],
- "optional": 1,
- "type": "string",
- "type-property": "type"
- },
- "comment": {
- "description": "HA rule description.",
- "maxLength": 4096,
- "optional": 1,
- "type": "string"
- },
- "delete": {
- "description": "A list of settings you want to delete.",
- "format": "pve-configid-list",
- "maxLength": 4096,
- "optional": 1,
- "type": "string"
- },
- "digest": {
- "description": "Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.",
- "maxLength": 64,
- "optional": 1,
- "type": "string"
- },
- "disable": {
- "description": "Whether the HA rule is disabled.",
- "optional": 1,
- "type": "boolean"
- },
- "nodes": {
- "completion": ("Code")[],
- "description": "List of cluster node names with optional priority.",
- "format": "pve-ha-node-list",
- "instance-types": [
- "node-affinity"
- ],
- "optional": 1,
- "type": "string",
"type-property": "type",
- "typetext": "<node>[:<pri>]{,<node>[:<pri>]}*",
- "verbose_description": "List of cluster node members, where a priority can be given to each node. A resource will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the resources will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
- },
- "resources": {
- "completion": ("Code")[],
- "description": "List of HA resource IDs. This consists of a list of resource types followed by a resource specific name separated with a colon (example: vm:100,ct:101).",
- "format": "pve-ha-resource-id-list",
- "optional": 1,
- "type": "string",
- "typetext": "<type>:<name>{,<type>:<name>}*"
- },
- "rule": {
- "completion": ("Code")[],
- "description": "HA rule identifier.",
- "format": "pve-configid",
- "optional": 0,
- "type": "string"
- },
- "strict": {
- "default": 0,
- "description": "Describes whether the node affinity rule is strict or non-strict.",
- "instance-types": [
- "node-affinity"
- ],
- "optional": 1,
- "type": "boolean",
- "type-property": "type",
- "verbose_description": "Describes whether the node affinity rule is strict or non-strict.\n\nA non-strict node affinity rule makes resources prefer to be on the defined nodes.\nIf none of the defined nodes are available, the resource may run on any other node.\n\nA strict node affinity rule makes resources be restricted to the defined nodes. If\nnone of the defined nodes are available, the resource will be stopped.\n"
- },
- "type": {
- "description": "HA rule type.",
- "enum": [
- "node-affinity",
- "resource-affinity"
- ],
- "type": "string"
+ "type-property-schema": {
+ "description": "HA rule type.",
+ "enum": [
+ "node-affinity",
+ "resource-affinity"
+ ],
+ "type": "string"
+ }
}
- },
- "type": "object"
+ ]
},
"permissions": {
"check": [
@@ -8638,75 +8679,112 @@
"method": "POST",
"name": "create_rule",
"parameters": {
- "additionalProperties": 0,
- "properties": {
- "affinity": {
- "description": "Describes whether the HA resources are supposed to be kept on the same node ('positive'), or are supposed to be kept on separate nodes ('negative').",
- "enum": ("Ref")["/root/0/children/8/children/2/children/0/info/PUT/parameters/properties/affinity/enum"],
- "instance-types": [
- "resource-affinity"
+ "allOf": [
+ {
+ "additionalProperties": 0,
+ "properties": {
+ "rule": {
+ "completion": ("Code")[],
+ "description": "HA rule identifier.",
+ "format": "pve-configid",
+ "optional": 0,
+ "type": "string"
+ }
+ }
+ },
+ {
+ "oneOf": [
+ {
+ "additionalProperties": 0,
+ "instance-type": "node-affinity",
+ "properties": {
+ "affinity": {
+ "default": "positive",
+ "description": "Describes whether the HA resources are supposed to be placed on the given nodes ('positive'), or are supposed to be placed on any but the given nodes ('negative').",
+ "enum": ("Ref")["/root/0/children/8/children/2/children/0/info/PUT/parameters/allOf/2/oneOf/0/properties/affinity/enum"],
+ "optional": 1,
+ "type": "string"
+ },
+ "comment": {
+ "description": "HA rule description.",
+ "maxLength": 4096,
+ "optional": 1,
+ "type": "string"
+ },
+ "disable": {
+ "description": "Whether the HA rule is disabled.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "nodes": {
+ "completion": ("Code")[],
+ "description": "List of cluster node names with optional priority.",
+ "format": "pve-ha-node-list",
+ "optional": 0,
+ "type": "string",
+ "typetext": "<node>[:<pri>]{,<node>[:<pri>]}*",
+ "verbose_description": "List of cluster node members, where a priority can be given to each node. A resource will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the resources will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
+ },
+ "resources": {
+ "completion": ("Code")[],
+ "description": "List of HA resource IDs. This consists of a list of resource types followed by a resource specific name separated with a colon (example: vm:100,ct:101).",
+ "format": "pve-ha-resource-id-list",
+ "optional": 0,
+ "type": "string",
+ "typetext": "<type>:<name>{,<type>:<name>}*"
+ },
+ "strict": {
+ "default": 0,
+ "description": "Describes whether the node affinity rule is strict or non-strict.",
+ "optional": 1,
+ "type": "boolean",
+ "verbose_description": "Describes whether the node affinity rule is strict or non-strict.\n\nA non-strict node affinity rule makes resources prefer to be on the defined nodes.\nIf none of the defined nodes are available, the resource may run on any other node.\n\nA strict node affinity rule makes resources be restricted to the defined nodes. If\nnone of the defined nodes are available, the resource will be stopped.\n"
+ }
+ }
+ },
+ {
+ "additionalProperties": 0,
+ "instance-type": "resource-affinity",
+ "properties": {
+ "affinity": {
+ "description": "Describes whether the HA resources are supposed to be kept on the same node ('positive'), or are supposed to be kept on separate nodes ('negative').",
+ "enum": ("Ref")["/root/0/children/8/children/2/children/0/info/PUT/parameters/allOf/2/oneOf/1/properties/affinity/enum"],
+ "optional": 0,
+ "type": "string"
+ },
+ "comment": {
+ "description": "HA rule description.",
+ "maxLength": 4096,
+ "optional": 1,
+ "type": "string"
+ },
+ "disable": {
+ "description": "Whether the HA rule is disabled.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "resources": {
+ "completion": ("Code")[],
+ "description": "List of HA resource IDs. This consists of a list of resource types followed by a resource specific name separated with a colon (example: vm:100,ct:101).",
+ "format": "pve-ha-resource-id-list",
+ "optional": 0,
+ "type": "string",
+ "typetext": "<type>:<name>{,<type>:<name>}*"
+ }
+ }
+ }
],
- "optional": 1,
- "type": "string",
- "type-property": "type"
- },
- "comment": {
- "description": "HA rule description.",
- "maxLength": 4096,
- "optional": 1,
- "type": "string"
- },
- "disable": {
- "description": "Whether the HA rule is disabled.",
- "optional": 1,
- "type": "boolean"
- },
- "nodes": {
- "completion": ("Code")[],
- "description": "List of cluster node names with optional priority.",
- "format": "pve-ha-node-list",
- "instance-types": [
- "node-affinity"
- ],
- "optional": 1,
- "type": "string",
"type-property": "type",
- "typetext": "<node>[:<pri>]{,<node>[:<pri>]}*",
- "verbose_description": "List of cluster node members, where a priority can be given to each node. A resource will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the resources will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
- },
- "resources": {
- "completion": ("Code")[],
- "description": "List of HA resource IDs. This consists of a list of resource types followed by a resource specific name separated with a colon (example: vm:100,ct:101).",
- "format": "pve-ha-resource-id-list",
- "optional": 0,
- "type": "string",
- "typetext": "<type>:<name>{,<type>:<name>}*"
- },
- "rule": {
- "completion": ("Code")[],
- "description": "HA rule identifier.",
- "format": "pve-configid",
- "optional": 0,
- "type": "string"
- },
- "strict": {
- "default": 0,
- "description": "Describes whether the node affinity rule is strict or non-strict.",
- "instance-types": [
- "node-affinity"
- ],
- "optional": 1,
- "type": "boolean",
- "type-property": "type",
- "verbose_description": "Describes whether the node affinity rule is strict or non-strict.\n\nA non-strict node affinity rule makes resources prefer to be on the defined nodes.\nIf none of the defined nodes are available, the resource may run on any other node.\n\nA strict node affinity rule makes resources be restricted to the defined nodes. If\nnone of the defined nodes are available, the resource will be stopped.\n"
- },
- "type": {
- "description": "HA rule type.",
- "enum": ("Ref")["/root/0/children/8/children/2/children/0/info/PUT/parameters/properties/type/enum"],
- "type": "string"
+ "type-property-schema": {
+ "description": "HA rule type.",
+ "enum": [
+ "node-affinity",
+ "resource-affinity"
+ ],
+ "type": "string"
+ }
}
- },
- "type": "object"
+ ]
},
"permissions": {
"check": [
@@ -10103,6 +10181,74 @@
"path": "/cluster/ceph/status",
"text": "status"
},
+ {
+ "info": {
+ "POST": {
+ "allowtoken": 1,
+ "description": "Cluster-wide rolling restart of all Ceph daemons of the given type. For MON/MGR/MDS each daemon is restarted only after Ceph reports the previous one is back up and the next one is safe to stop. For OSDs the cluster path orchestrates the per-node endpoint at /nodes/{node}/ceph/restart-bulk on each node in turn, inheriting that endpoint's per-OSD 'noout' handling and resume support. The 'noout' flag itself is not exposed by this endpoint as it is OSD-specific (and for OSDs handled by the per-node sub-tasks).",
+ "expose_credentials": 1,
+ "method": "POST",
+ "name": "restart_bulk",
+ "parameters": {
+ "additionalProperties": 0,
+ "properties": {
+ "dry-run": {
+ "default": 0,
+ "description": "Log the plan (which daemons would be restarted, in what order) without actually doing anything.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "force": {
+ "default": 0,
+ "description": "Proceed past a HEALTH_WARN with non-benign checks like PG_DEGRADED, SLOW_OPS, or MON_DOWN. HEALTH_ERR is always fatal regardless. The operator is responsible for confirming the cluster is stable enough to absorb a rolling restart.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "only-outdated": {
+ "default": 0,
+ "description": "OSDs only: restart only OSDs whose running version differs from the locally-installed ceph-osd binary on their host. Forwarded to each per-node sub-task so the per-host installed version is used (a partial upgrade where one host is on a newer build is handled correctly).",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "service-type": {
+ "description": "Ceph daemon type to restart cluster-wide.",
+ "enum": [
+ "mon",
+ "mgr",
+ "mds",
+ "osd"
+ ],
+ "type": "string"
+ },
+ "timeout": {
+ "default": 600,
+ "description": "Per-daemon timeout (in seconds) for the up-wait phase. Note: for daemons on remote nodes the same timeout also bounds the remote restart task, so the per-daemon budget can be up to 2x this value. Default sized for slow MDS journal replay or MON paxos settle on busy clusters; bump higher if the cluster routinely takes longer to stabilize after a daemon restart.",
+ "maximum": 1800,
+ "minimum": 30,
+ "optional": 1,
+ "type": "integer"
+ }
+ }
+ },
+ "permissions": {
+ "check": [
+ "perm",
+ "/",
+ [
+ "Sys.Modify"
+ ]
+ ]
+ },
+ "protected": 1,
+ "returns": {
+ "type": "string"
+ }
+ }
+ },
+ "leaf": 1,
+ "path": "/cluster/ceph/restart-bulk",
+ "text": "restart-bulk"
+ },
{
"children": [
{
@@ -10158,7 +10304,7 @@
"properties": {
"flag": {
"description": "The ceph flag to update",
- "enum": ("Ref")["/root/0/children/10/children/2/children/0/info/GET/parameters/properties/flag/enum"],
+ "enum": ("Ref")["/root/0/children/10/children/3/children/0/info/GET/parameters/properties/flag/enum"],
"type": "string"
},
"value": {
@@ -10217,7 +10363,7 @@
},
"name": {
"description": "Flag name.",
- "enum": ("Ref")["/root/0/children/10/children/2/children/0/info/GET/parameters/properties/flag/enum"],
+ "enum": ("Ref")["/root/0/children/10/children/3/children/0/info/GET/parameters/properties/flag/enum"],
"type": "string"
},
"value": {
@@ -24032,6 +24178,12 @@
"optional": 1,
"type": "boolean"
},
+ "host-tunnel": {
+ "description": "Enable host GSO over UDP tunnel offload. (VirtIO only).",
+ "optional": 1,
+ "type": "boolean",
+ "verbose_description": "Enable host GSO over UDP tunnel offload (VirtIO only). Requires QEMU > 10.2 and guest and host kernel support. Disabled by default starting with machine version 11.0+pve1 to work around an issue with the virtio-net driver in guest kernels. With machine versions 10.2 and 11.0, this is enabled by default."
+ },
"i82551": {
"alias": "macaddr",
"keyAlias": "model"
@@ -29154,7 +29306,7 @@
"type": "string"
},
"format": {
- "description": "Target format for file storage. Only valid for full clone.",
+ "description": "Target disk format. Only valid for full clone. If the target storage does not support the format, the storage's default format is used instead.",
"enum": [
"raw",
"qcow2",
@@ -29617,7 +29769,7 @@
"type": "string"
},
"format": {
- "description": "Target Format.",
+ "description": "Target disk format. Only used when moving to a different storage. If the target storage does not support the format, the storage's default format is used instead.",
"enum": [
"raw",
"qcow2",
@@ -45021,7 +45173,7 @@
"properties": {
"hotstandby": {
"default": 0,
- "description": "Determines whether a ceph-mds daemon should poll and replay the log of an active MDS. Faster switch on MDS failure, but needs more idle resources.",
+ "description": "Determines whether a ceph-mds daemon should poll and replay the log of an active MDS. Faster switch on MDS failure, but needs more idle resources. Deprecated: the setting was removed in Ceph 14.1.1.",
"optional": 1,
"type": "boolean"
},
@@ -46451,6 +46603,70 @@
"path": "/nodes/{node}/ceph/pool",
"text": "pool"
},
+ {
+ "info": {
+ "GET": {
+ "allowtoken": 1,
+ "description": "List all known Ceph releases, marking which ones can be installed on this node.",
+ "method": "GET",
+ "name": "releases",
+ "parameters": {
+ "additionalProperties": 0,
+ "properties": {
+ "node": {
+ "description": "The cluster node name.",
+ "format": "pve-node",
+ "type": "string"
+ }
+ }
+ },
+ "permissions": {
+ "check": [
+ "perm",
+ "/",
+ [
+ "Sys.Audit",
+ "Datastore.Audit"
+ ],
+ "any",
+ 1
+ ]
+ },
+ "proxyto": "node",
+ "returns": {
+ "items": {
+ "properties": {
+ "available": {
+ "description": "Whether this release can be installed on this node, that is, it has packages for the node's architecture and current Proxmox VE release.",
+ "type": "boolean"
+ },
+ "is-default": {
+ "description": "Whether this is the release recommended for new installations.",
+ "type": "boolean"
+ },
+ "release": {
+ "description": "The Ceph release code name, for example 'squid'.",
+ "type": "string"
+ },
+ "unsupported": {
+ "description": "Whether this release is not (yet) supported for production use.",
+ "type": "boolean"
+ },
+ "version": {
+ "description": "The Ceph release major version, for example '19.2'.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "leaf": 1,
+ "path": "/nodes/{node}/ceph/releases",
+ "text": "releases"
+ },
{
"info": {
"POST": {
@@ -46665,6 +46881,88 @@
"path": "/nodes/{node}/ceph/restart",
"text": "restart"
},
+ {
+ "info": {
+ "POST": {
+ "allowtoken": 1,
+ "description": "Rolling restart of all Ceph OSDs on this node. Each OSD is restarted only after Ceph reports the previous one is back up and the next one is safe to stop. For non-OSD Ceph daemons, use the cluster-wide endpoint at /cluster/ceph/restart-bulk. The 'noout' flag is applied only to the OSDs targeted by this run, so unrelated OSDs on other nodes that fail during the restart window still get out-marked normally. Aborting the resulting task (for example via 'pvesh task stop') triggers a SIGTERM handler that unsets the per-OSD 'noout' if this endpoint set it. Per-daemon progress is checkpointed in Ceph's config-key store ('pve/ceph-bulk-restart/node/<node>'), so an aborted run can be resumed by re-issuing this endpoint with 'resume=1'.",
+ "method": "POST",
+ "name": "restart_bulk",
+ "parameters": {
+ "additionalProperties": 0,
+ "properties": {
+ "dry-run": {
+ "default": 0,
+ "description": "Log the plan (which OSDs would be restarted, in what order) without actually doing anything.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "force": {
+ "default": 0,
+ "description": "Proceed past a HEALTH_WARN with non-benign checks like PG_DEGRADED, SLOW_OPS, or MON_DOWN. HEALTH_ERR is always fatal regardless. The operator is responsible for confirming the cluster is stable enough to absorb a rolling restart.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "node": {
+ "description": "The cluster node name.",
+ "format": "pve-node",
+ "type": "string"
+ },
+ "only-outdated": {
+ "default": 0,
+ "description": "Restart only OSDs whose running version differs from the locally-installed ceph-osd binary. Useful for post-upgrade rolling restarts that should touch only daemons that need it. Refuses if the local binary version cannot be determined. Ignored on resume (the saved plan is used as-is).",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "resume": {
+ "default": 0,
+ "description": "Resume an aborted bulk-restart from the checkpoint stored in Ceph's config-key store. The plan and noout decision from the prior run are honored; 'set-noout' is ignored. When false (default), the endpoint refuses to start if a checkpoint exists for this node, to avoid silently overwriting in-progress work.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "service-type": {
+ "description": "Ceph daemon type to restart. Only OSDs can be rolling-restarted on a per-node basis.",
+ "enum": [
+ "osd"
+ ],
+ "type": "string"
+ },
+ "set-noout": {
+ "default": 1,
+ "description": "Set the 'noout' flag on each OSD targeted by this run for the duration of the rolling restart, and unset it on completion. Per-OSD rather than cluster-wide so that unrelated OSDs failing on other nodes still trigger backfill normally.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "timeout": {
+ "default": 600,
+ "description": "Per-OSD timeout (in seconds). Bounds both the wait for a restarted OSD to come back up and the wait for recovery to quiesce enough that Ceph reports the next OSD safe to stop. Default sized for busy clusters where multi-TB OSDs with many PGs can need several minutes to clear peering after a restart; bump higher for very large or heavily-loaded OSDs.",
+ "maximum": 1800,
+ "minimum": 30,
+ "optional": 1,
+ "type": "integer"
+ }
+ }
+ },
+ "permissions": {
+ "check": [
+ "perm",
+ "/",
+ [
+ "Sys.Modify"
+ ]
+ ]
+ },
+ "protected": 1,
+ "proxyto": "node",
+ "returns": {
+ "type": "string"
+ }
+ }
+ },
+ "leaf": 1,
+ "path": "/nodes/{node}/ceph/restart-bulk",
+ "text": "restart-bulk"
+ },
{
"info": {
"GET": {
@@ -47147,7 +47445,7 @@
}
},
"permissions": {
- "description": "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage (and fleecing storage when fleecing is used). The 'tmpdir', 'dumpdir', 'script' and 'job-id' parameters are restricted to the 'root@pam' user. The 'prune-backups' setting requires 'Datastore.Allocate' on the backup storage. The 'bwlimit', 'performance' and 'ionice' parameters require 'Sys.Modify' on '/'.",
+ "description": "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage (and fleecing storage when fleecing is used). The 'tmpdir', 'dumpdir', 'script' and 'job-id' parameters are restricted to the 'root@pam' user. The 'prune-backups' setting requires 'Datastore.Allocate' on the backup storage. The 'bwlimit', 'performance' and 'ionice' parameters require 'Sys.Modify' on '/'. The 'stop' parameter requires 'Sys.Modify' on '/nodes/{node}'",
"user": "all"
},
"protected": 1,
@@ -47735,7 +48033,7 @@
"key": {
"description": "Proxmox VE subscription key",
"maxLength": 32,
- "pattern": "\\s*pve([1248])([cbsp])-[0-9a-f]{10}\\s*",
+ "pattern": "\\s*pve([1248])([cbsp])-(arm-)?[0-9a-f]{10}\\s*",
"type": "string"
},
"node": {
@@ -56295,6 +56593,18 @@
"optional": 1,
"type": "string"
},
+ "identifiers": {
+ "default": 0,
+ "description": "Also return a record listing the distinct syslog identifiers present, for filter completion. Only honored together with 'structured'.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "kernel": {
+ "default": 0,
+ "description": "Only print kernel messages.",
+ "optional": 1,
+ "type": "boolean"
+ },
"lastentries": {
"description": "Limit to the last X lines. Conflicts with a range.",
"minimum": 0,
@@ -56306,6 +56616,19 @@
"format": "pve-node",
"type": "string"
},
+ "priority": {
+ "description": "Only print messages of this syslog priority: a single level from 0 (emerg) to 7 (debug), selecting that level and everything more severe, or a 'LOW..HIGH' range. Empty means no priority filter.",
+ "optional": 1,
+ "pattern": "^([0-7](\\.\\.[0-7])?)?$",
+ "type": "string"
+ },
+ "service": {
+ "description": "Only print messages whose syslog identifier matches this glob, for example 'pve*' or 'postfix/*'.",
+ "maxLength": 128,
+ "optional": 1,
+ "pattern": "^[A-Za-z0-9_.@:*?!\\[\\]\\/-]+$",
+ "type": "string"
+ },
"since": {
"description": "Display all log since this UNIX epoch. Conflicts with 'startcursor'.",
"minimum": 0,
@@ -56317,6 +56640,25 @@
"optional": 1,
"type": "string"
},
+ "structured": {
+ "default": 0,
+ "description": "Return one JSON object per entry with separate fields (timestamp, identifier, message, priority, ...) instead of pre-rendered text lines.",
+ "optional": 1,
+ "type": "boolean"
+ },
+ "unit": {
+ "description": "Only print messages of this systemd unit (the .service suffix is implied).",
+ "maxLength": 256,
+ "optional": 1,
+ "pattern": "^[A-Za-z0-9_.@:-]+$",
+ "type": "string"
+ },
+ "units": {
+ "default": 0,
+ "description": "Also return a record listing the distinct systemd units present, for filter completion. Only honored together with 'structured'.",
+ "optional": 1,
+ "type": "boolean"
+ },
"until": {
"description": "Display all log until this UNIX epoch. Conflicts with 'endcursor'.",
"minimum": 0,
diff --git a/pve-api-types/src/generated/code.rs b/pve-api-types/src/generated/code.rs
index 23b729c1..4c389585 100644
--- a/pve-api-types/src/generated/code.rs
+++ b/pve-api-types/src/generated/code.rs
@@ -47,6 +47,7 @@
/// - /cluster/bulk-action/guest/start
/// - /cluster/bulk-action/guest/suspend
/// - /cluster/ceph
+/// - /cluster/ceph/restart-bulk
/// - /cluster/config
/// - /cluster/config/apiversion
/// - /cluster/config/nodes
@@ -153,6 +154,8 @@
/// - /nodes/{node}/capabilities/qemu/migration
/// - /nodes/{node}/ceph
/// - /nodes/{node}/ceph/cfg
+/// - /nodes/{node}/ceph/releases
+/// - /nodes/{node}/ceph/restart-bulk
/// - /nodes/{node}/certificates
/// - /nodes/{node}/certificates/acme
/// - /nodes/{node}/certificates/acme/certificate
diff --git a/pve-api-types/src/generated/types.rs b/pve-api-types/src/generated/types.rs
index e5783d3d..6efedbff 100644
--- a/pve-api-types/src/generated/types.rs
+++ b/pve-api-types/src/generated/types.rs
@@ -3407,7 +3407,7 @@ pub struct CreateCephFs {
pub struct CreateCephMds {
/// Determines whether a ceph-mds daemon should poll and replay the log of
/// an active MDS. Faster switch on MDS failure, but needs more idle
- /// resources.
+ /// resources. Deprecated: the setting was removed in Ceph 14.1.1.
#[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub hotstandby: Option<bool>,
@@ -15130,6 +15130,10 @@ fn test_regex_compilation_26() {
default: false,
optional: true,
},
+ "host-tunnel": {
+ default: false,
+ optional: true,
+ },
link_down: {
default: false,
optional: true,
@@ -15193,6 +15197,12 @@ pub struct QemuConfigNet {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub firewall: Option<bool>,
+ /// Enable host GSO over UDP tunnel offload. (VirtIO only).
+ #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ #[serde(rename = "host-tunnel")]
+ pub host_tunnel: Option<bool>,
+
/// Whether this interface should be disconnected (like pulling the plug).
#[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
#[serde(default, skip_serializing_if = "Option::is_none")]
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH proxmox v2 5/6] pve-api-types: register missing pve-fw-comment-spec verify function
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
` (3 preceding siblings ...)
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 ` 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
5 siblings, 0 replies; 7+ messages in thread
From: Shan Shaji @ 2026-09-02 14:59 UTC (permalink / raw)
To: pve-devel
Earlier, `make all` failed to regenerate the types due to missing
registration of pve-fw-comment-spec format function. Resolved it
by registering it.
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
pve-api-types/generate.pl | 2 +-
pve-api-types/pve-api.json | 25 +++++++++++++++++++++++++
pve-api-types/src/generated/types.rs | 8 ++++++++
pve-api-types/src/types/verifiers.rs | 9 +++++++++
4 files changed, 43 insertions(+), 1 deletion(-)
diff --git a/pve-api-types/generate.pl b/pve-api-types/generate.pl
index 927c822b..26d1b842 100755
--- a/pve-api-types/generate.pl
+++ b/pve-api-types/generate.pl
@@ -124,7 +124,7 @@ Schema2Rust::register_format('pve-sdn-controller-id' => { code => 'verifiers::ve
Schema2Rust::register_format('pve-sdn-isis-net' => { regex => '^[a-fA-F0-9]{2}(\.[a-fA-F0-9]{4}){3,9}\.[a-fA-F0-9]{2}$' });
Schema2Rust::register_format('pve-sdn-fabric-id' => { code => 'verifiers::verify_sdn_id' });
Schema2Rust::register_format('pve-sdn-route-map-id' => { code => 'verifiers::verify_sdn_route_map_id' });
-
+Schema2Rust::register_format('pve-fw-comment-spec' => { code => 'verifiers::verify_fw_comment_spec' });
# This is used as both a task status and guest status.
Schema2Rust::generate_enum('IsRunning', {
type => 'string',
diff --git a/pve-api-types/pve-api.json b/pve-api-types/pve-api.json
index 36ba0b07..1006538e 100644
--- a/pve-api-types/pve-api.json
+++ b/pve-api-types/pve-api.json
@@ -143,6 +143,7 @@
"pve-day-of-week": ("Code")[],
"pve-dir-override": ("Code")[],
"pve-fw-addr-spec": ("Code")[],
+ "pve-fw-comment-spec": ("Code")[],
"pve-fw-conntrack-helper": ("Code")[],
"pve-fw-dport-spec": ("Code")[],
"pve-fw-icmp-type-spec": ("Code")[],
@@ -5290,6 +5291,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -5496,6 +5498,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -5622,6 +5625,7 @@
"items": {
"properties": {
"comment": {
+ "description": "Optional comment or description.",
"optional": 1,
"type": "string"
},
@@ -5659,6 +5663,7 @@
"additionalProperties": 0,
"properties": {
"comment": {
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -5784,6 +5789,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -5951,6 +5957,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -6142,6 +6149,7 @@
"properties": {
"cidr": ("Ref")["/root/0/children/5/children/2/children/0/children/0/info/DELETE/parameters/properties/cidr"],
"comment": {
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -6361,6 +6369,7 @@
"additionalProperties": 0,
"properties": {
"comment": {
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -6485,6 +6494,7 @@
"type": "string"
},
"comment": {
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -6818,19 +6828,24 @@
"items": {
"properties": {
"comment": {
+ "description": "Optional comment or description.",
"optional": 1,
"type": "string"
},
"name": {
+ "description": "The name of the alias or ipset.",
"type": "string"
},
"ref": {
+ "description": "The reference string used in firewall rules.",
"type": "string"
},
"scope": {
+ "description": "The scope of the reference (e.g., SDN).",
"type": "string"
},
"type": {
+ "description": "The type of reference (alias or ipset).",
"enum": [
"alias",
"ipset"
@@ -12176,6 +12191,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -12336,6 +12352,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -20702,6 +20719,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -20874,6 +20892,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -21507,6 +21526,7 @@
"additionalProperties": 0,
"properties": {
"comment": {
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -39456,6 +39476,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -39628,6 +39649,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -40261,6 +40283,7 @@
"additionalProperties": 0,
"properties": {
"comment": {
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -53768,6 +53791,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
@@ -53938,6 +53962,7 @@
},
"comment": {
"description": "Descriptive comment.",
+ "format": "pve-fw-comment-spec",
"optional": 1,
"type": "string"
},
diff --git a/pve-api-types/src/generated/types.rs b/pve-api-types/src/generated/types.rs
index 6efedbff..129f82ed 100644
--- a/pve-api-types/src/generated/types.rs
+++ b/pve-api-types/src/generated/types.rs
@@ -3955,6 +3955,7 @@ pub struct CreateController {
type: String,
},
comment: {
+ format: &ApiStringFormat::VerifyFn(verifiers::verify_fw_comment_spec),
optional: true,
type: String,
description: "Descriptive comment",
@@ -3987,6 +3988,7 @@ pub struct CreateFirewallAlias {
description: "CIDR address",
},
comment: {
+ format: &ApiStringFormat::VerifyFn(verifiers::verify_fw_comment_spec),
optional: true,
type: String,
description: "Descriptive comment",
@@ -4996,14 +4998,18 @@ pub struct FirewallMacro {
/// Object.
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct FirewallRef {
+ /// Optional comment or description.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
+ /// The name of the alias or ipset.
pub name: String,
+ /// The reference string used in firewall rules.
#[serde(rename = "ref")]
pub r#ref: String,
+ /// The scope of the reference (e.g., SDN).
pub scope: String,
#[serde(rename = "type")]
@@ -21996,6 +22002,7 @@ pub struct UpdateClusterOptions {
type: String,
},
comment: {
+ format: &ApiStringFormat::VerifyFn(verifiers::verify_fw_comment_spec),
optional: true,
type: String,
description: "Descriptive comment",
@@ -22035,6 +22042,7 @@ pub struct UpdateFirewallAlias {
#[api(
properties: {
comment: {
+ format: &ApiStringFormat::VerifyFn(verifiers::verify_fw_comment_spec),
optional: true,
type: String,
description: "Descriptive comment",
diff --git a/pve-api-types/src/types/verifiers.rs b/pve-api-types/src/types/verifiers.rs
index c377c4a0..b0ebaba4 100644
--- a/pve-api-types/src/types/verifiers.rs
+++ b/pve-api-types/src/types/verifiers.rs
@@ -61,6 +61,7 @@ pub SDN_ROUTE_MAP_ID_RESERVED = r##"^(pve_.*|MAP_VTEP_IN|MAP_VTEP_OUT|correct_sr
pub SCOPED_IP_ALIAS_RE = r##"^(dc/|guest/)?([A-Za-z][A-Za-z0-9\-\_]+)$"##;
+pub LINE_FEED_RE = r##"[\n\r]"##;
}
pub fn verify_volume_id(s: &str) -> Result<(), Error> {
@@ -346,3 +347,11 @@ pub fn verify_pve_acme_alias(s: &str) -> Result<(), Error> {
bail!("not a valid acme alias");
}
}
+
+pub fn verify_fw_comment_spec(s: &str) -> Result<(), Error> {
+ if LINE_FEED_RE.is_match(s) {
+ bail!("comment must not contain a line feed");
+ }
+
+ Ok(())
+}
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH proxmox v2 6/6] pve-api-types: update API dump for /node/status and regenerate types
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
` (4 preceding siblings ...)
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 ` Shan Shaji
5 siblings, 0 replies; 7+ messages in thread
From: Shan Shaji @ 2026-09-02 14:59 UTC (permalink / raw)
To: pve-devel
Adds `uptime` and `idle` properties to the NodeStatus struct.
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
pve-api-types/pve-api.json | 10 ++++++++++
pve-api-types/src/generated/types.rs | 16 ++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/pve-api-types/pve-api.json b/pve-api-types/pve-api.json
index 1006538e..7e77070e 100644
--- a/pve-api-types/pve-api.json
+++ b/pve-api-types/pve-api.json
@@ -56178,6 +56178,11 @@
},
"type": "object"
},
+ "idle": {
+ "description": "Sum of how much time each core has spent idle, in seconds.",
+ "minimum": 0,
+ "type": "integer"
+ },
"loadavg": {
"description": "An array of load avg for 1, 5 and 15 minutes respectively.",
"items": {
@@ -56231,6 +56236,11 @@
}
},
"type": "object"
+ },
+ "uptime": {
+ "description": "The uptime of the system (including time spent in suspend), in seconds.",
+ "minimum": 0,
+ "type": "integer"
}
},
"type": "object"
diff --git a/pve-api-types/src/generated/types.rs b/pve-api-types/src/generated/types.rs
index 129f82ed..3a1e4951 100644
--- a/pve-api-types/src/generated/types.rs
+++ b/pve-api-types/src/generated/types.rs
@@ -11487,6 +11487,10 @@ pub struct NodeShellTicket {
"current-kernel": {
type: NodeStatusCurrentKernel,
},
+ idle: {
+ minimum: 0,
+ type: Integer,
+ },
loadavg: {
items: {
description: "The value of the load.",
@@ -11503,6 +11507,10 @@ pub struct NodeShellTicket {
rootfs: {
type: NodeStatusRootfs,
},
+ uptime: {
+ minimum: 0,
+ type: Integer,
+ },
},
)]
/// Object.
@@ -11522,6 +11530,10 @@ pub struct NodeStatus {
#[serde(rename = "current-kernel")]
pub current_kernel: NodeStatusCurrentKernel,
+ /// Sum of how much time each core has spent idle, in seconds.
+ #[serde(deserialize_with = "proxmox_serde::perl::deserialize_u64")]
+ pub idle: u64,
+
/// An array of load avg for 1, 5 and 15 minutes respectively.
pub loadavg: Vec<String>,
@@ -11532,6 +11544,10 @@ pub struct NodeStatus {
pub rootfs: NodeStatusRootfs,
+ /// The uptime of the system (including time spent in suspend), in seconds.
+ #[serde(deserialize_with = "proxmox_serde::perl::deserialize_u64")]
+ pub uptime: u64,
+
#[serde(flatten)]
pub additional_properties: HashMap<String, Value>,
}
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-02 15:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH pve-manager v2 2/6] fix: node: add missing `uptime` property inside the return schema Shan Shaji
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox