all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pdm-devel] [PATCH proxmox/proxmox-datacenter-manager 0/2] update PVE API spec and fix affected code
@ 2025-10-08  7:31 Hannes Laimer
  2025-10-08  7:31 ` [pdm-devel] [PATCH proxmox 1/1] pve-api: update spec Hannes Laimer
  2025-10-08  7:31 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] remote_updates: fix update info mapper Hannes Laimer
  0 siblings, 2 replies; 4+ messages in thread
From: Hannes Laimer @ 2025-10-08  7:31 UTC (permalink / raw)
  To: pdm-devel

Recently a few improvements for types in the PVE API were introduced. This
series updates the pve-api.json dump and also fixes a small problem in
pdm that was the result of now having a concrete type rather than just a
string.

The new dump is based on the versions currently in our staging repo + [1].

[1] https://lore.proxmox.com/pve-devel/20251007131113.2785229-1-t.lamprecht@proxmox.com/

proxmox:

Hannes Laimer (1):
  pve-api: update spec

 pve-api-types/pve-api.json           | 426 +++++++++++++++++----------
 pve-api-types/src/generated/types.rs | 211 +++----------
 2 files changed, 306 insertions(+), 331 deletions(-)


proxmox-datacenter-manager:

Hannes Laimer (1):
  remote_updates: fix update info mapper

 server/src/remote_updates.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


Summary over all repositories:
  3 files changed, 310 insertions(+), 332 deletions(-)

-- 
Generated by git-murpp 0.8.1


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


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

* [pdm-devel] [PATCH proxmox 1/1] pve-api: update spec
  2025-10-08  7:31 [pdm-devel] [PATCH proxmox/proxmox-datacenter-manager 0/2] update PVE API spec and fix affected code Hannes Laimer
@ 2025-10-08  7:31 ` Hannes Laimer
  2025-10-08  8:23   ` Hannes Laimer
  2025-10-08  7:31 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] remote_updates: fix update info mapper Hannes Laimer
  1 sibling, 1 reply; 4+ messages in thread
From: Hannes Laimer @ 2025-10-08  7:31 UTC (permalink / raw)
  To: pdm-devel

Update the pve-api.json dump and regenerate since there have been a few
additions to the API spec, mostly having better types definitions,
i.e. [1][2]. This also includes the changes from [3], so this does
depend on that being applied.

[1] pve-manager: 6deba095 (api: add APT versions return schema)
[2] pve-manager: 65a80884 (api: add replication config read return schema)
[3] https://lore.proxmox.com/pve-devel/20251007131113.2785229-1-t.lamprecht@proxmox.com/

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 pve-api-types/pve-api.json           | 426 +++++++++++++++++----------
 pve-api-types/src/generated/types.rs | 211 +++----------
 2 files changed, 306 insertions(+), 331 deletions(-)

diff --git a/pve-api-types/pve-api.json b/pve-api-types/pve-api.json
index 9db8fa13..257c21fb 100644
--- a/pve-api-types/pve-api.json
+++ b/pve-api-types/pve-api.json
@@ -148,7 +148,7 @@
       "pve-fw-protocol-spec": ("Code")[],
       "pve-fw-sport-spec": ("Code")[],
       "pve-groupid": ("Code")[],
-      "pve-ha-group-node": ("Code")[],
+      "pve-ha-node": ("Code")[],
       "pve-ha-resource-id": ("Code")[],
       "pve-ha-resource-or-vm-id": ("Code")[],
       "pve-hotplug-features": ("Code")[],
@@ -1085,16 +1085,6 @@
                               "user": "all"
                            },
                            "returns": {
-                              "type": "object"
-                           }
-                        },
-                        "PUT": {
-                           "allowtoken": 1,
-                           "description": "Update replication job configuration.",
-                           "method": "PUT",
-                           "name": "update",
-                           "parameters": {
-                              "additionalProperties": 0,
                               "properties": {
                                  "comment": {
                                     "description": "Description.",
@@ -1102,13 +1092,6 @@
                                     "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,
@@ -1120,12 +1103,20 @@
                                     "optional": 1,
                                     "type": "boolean"
                                  },
+                                 "guest": {
+                                    "description": "Guest ID.",
+                                    "type": "integer"
+                                 },
                                  "id": {
                                     "description": "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.",
                                     "format": "pve-replication-job-id",
                                     "pattern": "[1-9][0-9]{2,8}-\\d{1,9}",
                                     "type": "string"
                                  },
+                                 "jobnum": {
+                                    "description": "Unique, sequential ID assigned to each job.",
+                                    "type": "integer"
+                                 },
                                  "rate": {
                                     "description": "Rate limit in mbps (megabytes per second) as floating point number.",
                                     "minimum": 1,
@@ -1154,9 +1145,54 @@
                                     "format": "pve-node",
                                     "optional": 1,
                                     "type": "string"
+                                 },
+                                 "target": {
+                                    "description": "Target node.",
+                                    "format": "pve-node",
+                                    "optional": 0,
+                                    "type": "string"
+                                 },
+                                 "type": {
+                                    "description": "Section type.",
+                                    "enum": [
+                                       "local"
+                                    ],
+                                    "type": "string"
                                  }
                               },
                               "type": "object"
+                           }
+                        },
+                        "PUT": {
+                           "allowtoken": 1,
+                           "description": "Update replication job configuration.",
+                           "method": "PUT",
+                           "name": "update",
+                           "parameters": {
+                              "additionalProperties": 0,
+                              "properties": {
+                                 "comment": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/comment"],
+                                 "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": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/disable"],
+                                 "id": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/id"],
+                                 "rate": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/rate"],
+                                 "remove_job": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/remove_job"],
+                                 "schedule": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/schedule"],
+                                 "source": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/source"]
+                              },
+                              "type": "object"
                            },
                            "permissions": {
                               "description": "Requires the VM.Replicate permission on /vms/<vmid>.",
@@ -1189,7 +1225,19 @@
                      },
                      "returns": {
                         "items": {
-                           "properties": {},
+                           "properties": {
+                              "comment": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/comment"],
+                              "disable": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/disable"],
+                              "guest": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/guest"],
+                              "id": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/id"],
+                              "jobnum": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/jobnum"],
+                              "rate": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/rate"],
+                              "remove_job": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/remove_job"],
+                              "schedule": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/schedule"],
+                              "source": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/source"],
+                              "target": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/target"],
+                              "type": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/type"]
+                           },
                            "type": "object"
                         },
                         "links": [
@@ -1209,26 +1257,20 @@
                      "parameters": {
                         "additionalProperties": 0,
                         "properties": {
-                           "comment": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/comment"],
-                           "disable": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/disable"],
-                           "id": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/id"],
-                           "rate": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/rate"],
-                           "remove_job": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/remove_job"],
-                           "schedule": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/schedule"],
-                           "source": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/source"],
+                           "comment": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/comment"],
+                           "disable": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/disable"],
+                           "id": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/id"],
+                           "rate": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/rate"],
+                           "remove_job": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/remove_job"],
+                           "schedule": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/schedule"],
+                           "source": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/source"],
                            "target": {
                               "description": "Target node.",
                               "format": "pve-node",
                               "optional": 0,
                               "type": "string"
                            },
-                           "type": {
-                              "description": "Section type.",
-                              "enum": [
-                                 "local"
-                              ],
-                              "type": "string"
-                           }
+                           "type": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/type"]
                         },
                         "type": "object"
                      },
@@ -6185,10 +6227,10 @@
                                     "type": "boolean"
                                  },
                                  "enable": {
+                                    "default": 0,
                                     "description": "Enable or disable the firewall cluster wide.",
-                                    "minimum": 0,
                                     "optional": 1,
-                                    "type": "integer"
+                                    "type": "boolean"
                                  },
                                  "log_ratelimit": {
                                     "description": "Log ratelimiting settings",
@@ -6272,7 +6314,12 @@
                                     "type": "string"
                                  },
                                  "ebtables": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/ebtables"],
-                                 "enable": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/enable"],
+                                 "enable": {
+                                    "description": "Enable or disable the firewall cluster wide.",
+                                    "minimum": 0,
+                                    "optional": 1,
+                                    "type": "integer"
+                                 },
                                  "log_ratelimit": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/log_ratelimit"],
                                  "policy_forward": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/policy_forward"],
                                  "policy_in": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/policy_in"],
@@ -7714,11 +7761,11 @@
                                        },
                                        "nodes": {
                                           "description": "List of cluster node names with optional priority.",
-                                          "format": "pve-ha-group-node-list",
+                                          "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 bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
+                                          "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."
                                        },
                                        "nofailback": {
                                           "default": 0,
@@ -7805,11 +7852,11 @@
                                  "group": ("Ref")["/root/0/children/7/children/1/children/0/info/PUT/parameters/properties/group"],
                                  "nodes": {
                                     "description": "List of cluster node names with optional priority.",
-                                    "format": "pve-ha-group-node-list",
+                                    "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 bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
+                                    "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."
                                  },
                                  "nofailback": ("Ref")["/root/0/children/7/children/1/children/0/info/PUT/parameters/properties/nofailback"],
                                  "restricted": ("Ref")["/root/0/children/7/children/1/children/0/info/PUT/parameters/properties/restricted"],
@@ -7969,7 +8016,7 @@
                                        "nodes": {
                                           "completion": ("Code")[],
                                           "description": "List of cluster node names with optional priority.",
-                                          "format": "pve-ha-group-node-list",
+                                          "format": "pve-ha-node-list",
                                           "instance-types": [
                                              "node-affinity"
                                           ],
@@ -7977,7 +8024,7 @@
                                           "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 bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
+                                          "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")[],
@@ -8121,7 +8168,7 @@
                                  "nodes": {
                                     "completion": ("Code")[],
                                     "description": "List of cluster node names with optional priority.",
-                                    "format": "pve-ha-group-node-list",
+                                    "format": "pve-ha-node-list",
                                     "instance-types": [
                                        "node-affinity"
                                     ],
@@ -8129,7 +8176,7 @@
                                     "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 bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
+                                    "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")[],
@@ -8453,15 +8500,6 @@
                                  },
                                  "protected": 1,
                                  "returns": {
-                                    "type": "object"
-                                 }
-                              },
-                              "PUT": {
-                                 "allowtoken": 1,
-                                 "description": "Update ACME plugin configuration.",
-                                 "method": "PUT",
-                                 "name": "update_plugin",
-                                 "parameters": {
                                     "additionalProperties": 0,
                                     "properties": {
                                        "api": {
@@ -8633,19 +8671,6 @@
                                           "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": "Flag to disable the config.",
                                           "optional": 1,
@@ -8662,6 +8687,14 @@
                                           "optional": 1,
                                           "type": "string"
                                        },
+                                       "type": {
+                                          "description": "ACME challenge type.",
+                                          "enum": [
+                                             "dns",
+                                             "standalone"
+                                          ],
+                                          "type": "string"
+                                       },
                                        "validation-delay": {
                                           "default": 30,
                                           "description": "Extra delay in seconds to wait before requesting validation. Allows to cope with a long TTL of DNS records.",
@@ -8672,6 +8705,37 @@
                                        }
                                     },
                                     "type": "object"
+                                 }
+                              },
+                              "PUT": {
+                                 "allowtoken": 1,
+                                 "description": "Update ACME plugin configuration.",
+                                 "method": "PUT",
+                                 "name": "update_plugin",
+                                 "parameters": {
+                                    "additionalProperties": 0,
+                                    "properties": {
+                                       "api": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/api"],
+                                       "data": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/data"],
+                                       "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": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/disable"],
+                                       "id": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/id"],
+                                       "nodes": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/nodes"],
+                                       "validation-delay": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/validation-delay"]
+                                    },
+                                    "type": "object"
                                  },
                                  "permissions": {
                                     "check": [
@@ -8724,16 +8788,7 @@
                            },
                            "protected": 1,
                            "returns": {
-                              "items": {
-                                 "properties": {
-                                    "plugin": {
-                                       "description": "Unique identifier for ACME plugin instance.",
-                                       "format": "pve-configid",
-                                       "type": "string"
-                                    }
-                                 },
-                                 "type": "object"
-                              },
+                              "items": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns"],
                               "links": [
                                  {
                                     "href": "{plugin}",
@@ -8748,26 +8803,7 @@
                            "description": "Add ACME plugin configuration.",
                            "method": "POST",
                            "name": "add_plugin",
-                           "parameters": {
-                              "additionalProperties": 0,
-                              "properties": {
-                                 "api": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/api"],
-                                 "data": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/data"],
-                                 "disable": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/disable"],
-                                 "id": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/id"],
-                                 "nodes": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/nodes"],
-                                 "type": {
-                                    "description": "ACME challenge type.",
-                                    "enum": [
-                                       "dns",
-                                       "standalone"
-                                    ],
-                                    "type": "string"
-                                 },
-                                 "validation-delay": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/validation-delay"]
-                              },
-                              "type": "object"
-                           },
+                           "parameters": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns"],
                            "permissions": {
                               "check": [
                                  "perm",
@@ -15573,6 +15609,7 @@
                         }
                      },
                      "permissions": {
+                        "description": "The user needs 'Sys.Syslog' on '/' in order to get all logs.",
                         "user": "all"
                      },
                      "returns": {
@@ -20283,6 +20320,7 @@
                                                 "type": "boolean"
                                              },
                                              "ostype": {
+                                                "default": "other",
                                                 "description": "Specify guest operating system.",
                                                 "enum": [
                                                    "other",
@@ -43059,7 +43097,89 @@
                                        "protected": 1,
                                        "proxyto": "node",
                                        "returns": {
-                                          "properties": {},
+                                          "properties": {
+                                             "active-state": {
+                                                "description": "Current state of the service process (systemd ActiveState).",
+                                                "enum": [
+                                                   "active",
+                                                   "inactive",
+                                                   "failed",
+                                                   "activating",
+                                                   "deactivating",
+                                                   "maintenance",
+                                                   "reloading",
+                                                   "refreshing",
+                                                   "unknown"
+                                                ],
+                                                "type": "string"
+                                             },
+                                             "desc": {
+                                                "description": "Description of the service.",
+                                                "type": "string"
+                                             },
+                                             "name": {
+                                                "description": "Short identifier for the service (e.g., \"pveproxy\").",
+                                                "type": "string"
+                                             },
+                                             "service": {
+                                                "description": "Systemd unit name (e.g., pveproxy).",
+                                                "type": "string"
+                                             },
+                                             "state": {
+                                                "description": "Execution status of the service (systemd SubState).",
+                                                "enum": [
+                                                   "dead",
+                                                   "condition",
+                                                   "start-pre",
+                                                   "start",
+                                                   "start-post",
+                                                   "running",
+                                                   "exited",
+                                                   "reload",
+                                                   "reload-signal",
+                                                   "reload-notify",
+                                                   "mounting",
+                                                   "stop",
+                                                   "stop-watchdog",
+                                                   "stop-sigterm",
+                                                   "stop-sigkill",
+                                                   "stop-post",
+                                                   "final-watchdog",
+                                                   "final-sigterm",
+                                                   "final-sigkill",
+                                                   "failed",
+                                                   "dead-before-auto-restart",
+                                                   "failed-before-auto-restart",
+                                                   "dead-resources-pinned",
+                                                   "auto-restart",
+                                                   "auto-restart-queued",
+                                                   "cleaning",
+                                                   "unknown"
+                                                ],
+                                                "type": "string"
+                                             },
+                                             "unit-state": {
+                                                "description": "Whether the service is enabled (systemd UnitFileState).",
+                                                "enum": [
+                                                   "enabled",
+                                                   "enabled-runtime",
+                                                   "linked",
+                                                   "linked-runtime",
+                                                   "alias",
+                                                   "masked",
+                                                   "masked-runtime",
+                                                   "static",
+                                                   "disabled",
+                                                   "indirect",
+                                                   "generated",
+                                                   "transient",
+                                                   "bad",
+                                                   "not-found",
+                                                   "unknown"
+                                                ],
+                                                "type": "string"
+                                             }
+                                          },
                                           "type": "object"
                                        }
                                     }
@@ -43300,7 +43420,7 @@
                            "proxyto": "node",
                            "returns": {
                               "items": {
-                                 "properties": {},
+                                 "properties": ("Ref")["/root/1/children/0/children/4/children/0/children/0/info/GET/returns/properties"],
                                  "type": "object"
                               },
                               "links": [
@@ -46369,50 +46489,7 @@
                                        "protected": 1,
                                        "proxyto": "node",
                                        "returns": {
-                                          "properties": {
-                                             "active": {
-                                                "description": "Set when storage is accessible.",
-                                                "optional": 1,
-                                                "type": "boolean"
-                                             },
-                                             "avail": {
-                                                "description": "Available storage space in bytes.",
-                                                "optional": 1,
-                                                "renderer": "bytes",
-                                                "type": "integer"
-                                             },
-                                             "content": {
-                                                "description": "Allowed storage content types.",
-                                                "format": "pve-storage-content-list",
-                                                "type": "string"
-                                             },
-                                             "enabled": {
-                                                "description": "Set when storage is enabled (not disabled).",
-                                                "optional": 1,
-                                                "type": "boolean"
-                                             },
-                                             "shared": {
-                                                "description": "Shared flag from storage configuration.",
-                                                "optional": 1,
-                                                "type": "boolean"
-                                             },
-                                             "total": {
-                                                "description": "Total storage space in bytes.",
-                                                "optional": 1,
-                                                "renderer": "bytes",
-                                                "type": "integer"
-                                             },
-                                             "type": {
-                                                "description": "Storage type.",
-                                                "type": "string"
-                                             },
-                                             "used": {
-                                                "description": "Used storage space in bytes.",
-                                                "optional": 1,
-                                                "renderer": "bytes",
-                                                "type": "integer"
-                                             }
-                                          },
+                                          "properties": {},
                                           "type": "object"
                                        }
                                     }
@@ -48298,10 +48375,18 @@
                                        "properties": {
                                           "Arch": {
                                              "description": "Package Architecture.",
+                                             "enum": [
+                                                "armhf",
+                                                "arm64",
+                                                "amd64",
+                                                "ppc64el",
+                                                "risc64",
+                                                "s390x"
+                                             ],
                                              "type": "string"
                                           },
                                           "Description": {
-                                             "description": "Human-readable package description.",
+                                             "description": "Package description.",
                                              "type": "string"
                                           },
                                           "NotifyStatus": {
@@ -48315,7 +48400,7 @@
                                              "type": "string"
                                           },
                                           "Origin": {
-                                             "description": "Package origin.",
+                                             "description": "Package origin, e.g., 'Proxmox' or 'Debian'.",
                                              "type": "string"
                                           },
                                           "Package": {
@@ -48323,7 +48408,7 @@
                                              "type": "string"
                                           },
                                           "Priority": {
-                                             "description": "Package priority in human-readable form.",
+                                             "description": "Package priority.",
                                              "type": "string"
                                           },
                                           "Section": {
@@ -48772,7 +48857,40 @@
                                  "proxyto": "node",
                                  "returns": {
                                     "items": {
-                                       "properties": {},
+                                       "properties": {
+                                          "Arch": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Arch"],
+                                          "CurrentState": {
+                                             "description": "Current state of the package installed on the system.",
+                                             "enum": [
+                                                "Installed",
+                                                "NotInstalled",
+                                                "UnPacked",
+                                                "HalfConfigured",
+                                                "HalfInstalled",
+                                                "ConfigFiles"
+                                             ],
+                                             "type": "string"
+                                          },
+                                          "Description": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Description"],
+                                          "ManagerVersion": {
+                                             "description": "Version of the currently running pve-manager API server.",
+                                             "optional": 1,
+                                             "type": "string"
+                                          },
+                                          "NotifyStatus": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/NotifyStatus"],
+                                          "OldVersion": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/OldVersion"],
+                                          "Origin": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Origin"],
+                                          "Package": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Package"],
+                                          "Priority": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Priority"],
+                                          "RunningKernel": {
+                                             "description": "Kernel release, only for package 'proxmox-ve'.",
+                                             "optional": 1,
+                                             "type": "string"
+                                          },
+                                          "Section": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Section"],
+                                          "Title": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Title"],
+                                          "Version": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Version"]
+                                       },
                                        "type": "object"
                                     },
                                     "type": "array"
@@ -49286,6 +49404,7 @@
                                  "returns": {
                                     "properties": {
                                        "enable": {
+                                          "default": 1,
                                           "description": "Enable host firewall rules.",
                                           "optional": 1,
                                           "type": "boolean"
@@ -52601,12 +52720,6 @@
                               "optional": 1,
                               "type": "string"
                            },
-                           "path": {
-                              "description": "File system path.",
-                              "format": "pve-storage-path",
-                              "optional": 1,
-                              "type": "string"
-                           },
                            "pool": {
                               "description": "Pool.",
                               "optional": 1,
@@ -52765,7 +52878,6 @@
                                  "nfs",
                                  "pbs",
                                  "rbd",
-                                 "xfsrs-example",
                                  "zfs",
                                  "zfspool"
                               ],
@@ -52886,7 +52998,12 @@
                      "nowritecache": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/nowritecache"],
                      "options": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/options"],
                      "password": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/password"],
-                     "path": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/path"],
+                     "path": {
+                        "description": "File system path.",
+                        "format": "pve-storage-path",
+                        "optional": 1,
+                        "type": "string"
+                     },
                      "pool": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/pool"],
                      "port": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/port"],
                      "portal": {
@@ -52939,7 +53056,6 @@
                            "nfs",
                            "pbs",
                            "rbd",
-                           "xfsrs-example",
                            "zfs",
                            "zfspool"
                         ],
diff --git a/pve-api-types/src/generated/types.rs b/pve-api-types/src/generated/types.rs
index 2979e708..94b0ba15 100644
--- a/pve-api-types/src/generated/types.rs
+++ b/pve-api-types/src/generated/types.rs
@@ -1,7 +1,7 @@
 #[api(
     properties: {
         Arch: {
-            type: String,
+            type: AptUpdateInfoArch,
         },
         Description: {
             type: String,
@@ -37,11 +37,10 @@
 /// Object.
 #[derive(Debug, serde::Deserialize, serde::Serialize)]
 pub struct AptUpdateInfo {
-    /// Package Architecture.
     #[serde(rename = "Arch")]
-    pub arch: String,
+    pub arch: AptUpdateInfoArch,
 
-    /// Human-readable package description.
+    /// Package description.
     #[serde(rename = "Description")]
     pub description: String,
 
@@ -55,7 +54,7 @@ pub struct AptUpdateInfo {
     #[serde(rename = "OldVersion")]
     pub old_version: Option<String>,
 
-    /// Package origin.
+    /// Package origin, e.g., 'Proxmox' or 'Debian'.
     #[serde(rename = "Origin")]
     pub origin: String,
 
@@ -63,7 +62,7 @@ pub struct AptUpdateInfo {
     #[serde(rename = "Package")]
     pub package: String,
 
-    /// Package priority in human-readable form.
+    /// Package priority.
     #[serde(rename = "Priority")]
     pub priority: String,
 
@@ -80,6 +79,32 @@ pub struct AptUpdateInfo {
     pub version: String,
 }
 
+#[api]
+/// Package Architecture.
+#[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
+pub enum AptUpdateInfoArch {
+    #[serde(rename = "armhf")]
+    /// armhf.
+    Armhf,
+    #[serde(rename = "arm64")]
+    /// arm64.
+    Arm64,
+    #[serde(rename = "amd64")]
+    /// amd64.
+    Amd64,
+    #[serde(rename = "ppc64el")]
+    /// ppc64el.
+    Ppc64el,
+    #[serde(rename = "risc64")]
+    /// risc64.
+    Risc64,
+    #[serde(rename = "s390x")]
+    /// s390x.
+    S390x,
+}
+serde_plain::derive_display_from_serialize!(AptUpdateInfoArch);
+serde_plain::derive_fromstr_from_deserialize!(AptUpdateInfoArch);
+
 #[api(
     properties: {
         notify: {
@@ -7636,9 +7661,10 @@ serde_plain::derive_fromstr_from_deserialize!(QemuConfigNumaPolicy);
 
 #[api]
 /// Specify guest operating system.
-#[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
+#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
 pub enum QemuConfigOstype {
     #[serde(rename = "other")]
+    #[default]
     /// other.
     Other,
     #[serde(rename = "wxp")]
@@ -9909,101 +9935,6 @@ mod storage_info_content {
     }
 }
 
-const STORAGE_STATUS_CONTENT: Schema =
-    proxmox_schema::ArraySchema::new("list", &StorageContent::API_SCHEMA).schema();
-
-mod storage_status_content {
-    use serde::{Deserialize, Deserializer, Serialize, Serializer};
-
-    #[doc(hidden)]
-    pub trait Ser: Sized {
-        fn ser<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>;
-        fn de<'de, D>(deserializer: D) -> Result<Self, D::Error>
-        where
-            D: Deserializer<'de>;
-    }
-
-    impl<T: Serialize + for<'a> Deserialize<'a>> Ser for Vec<T> {
-        fn ser<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
-        where
-            S: Serializer,
-        {
-            super::stringlist::serialize(&self[..], serializer, &super::STORAGE_STATUS_CONTENT)
-        }
-
-        fn de<'de, D>(deserializer: D) -> Result<Self, D::Error>
-        where
-            D: Deserializer<'de>,
-        {
-            super::stringlist::deserialize(deserializer, &super::STORAGE_STATUS_CONTENT)
-        }
-    }
-
-    impl<T: Ser> Ser for Option<T> {
-        fn ser<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
-        where
-            S: Serializer,
-        {
-            match self {
-                None => serializer.serialize_none(),
-                Some(inner) => inner.ser(serializer),
-            }
-        }
-
-        fn de<'de, D>(deserializer: D) -> Result<Self, D::Error>
-        where
-            D: Deserializer<'de>,
-        {
-            use std::fmt;
-            use std::marker::PhantomData;
-
-            struct V<T: Ser>(PhantomData<T>);
-
-            impl<'de, T: Ser> serde::de::Visitor<'de> for V<T> {
-                type Value = Option<T>;
-
-                fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
-                    f.write_str("an optional string")
-                }
-
-                fn visit_none<E: serde::de::Error>(self) -> Result<Self::Value, E> {
-                    Ok(None)
-                }
-
-                fn visit_some<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
-                where
-                    D: Deserializer<'de>,
-                {
-                    T::de(deserializer).map(Some)
-                }
-
-                fn visit_str<E: serde::de::Error>(self, value: &str) -> Result<Self::Value, E> {
-                    use serde::de::IntoDeserializer;
-                    T::de(value.into_deserializer()).map(Some)
-                }
-            }
-
-            deserializer.deserialize_option(V::<T>(PhantomData))
-        }
-    }
-
-    pub fn serialize<T, S>(this: &T, serializer: S) -> Result<S::Ok, S::Error>
-    where
-        S: serde::Serializer,
-        T: Ser,
-    {
-        this.ser(serializer)
-    }
-
-    pub fn deserialize<'de, T, D>(deserializer: D) -> Result<T, D::Error>
-    where
-        D: serde::Deserializer<'de>,
-        T: Ser,
-    {
-        T::de(deserializer)
-    }
-}
-
 const_regex! {
 
 SDN_CONTROLLER_ISIS_IFACES_RE = r##"^[a-zA-Z][a-zA-Z0-9_]{1,20}([:\.]\d+)?$"##;
@@ -11382,82 +11313,10 @@ pub struct StorageInfo {
     pub used_fraction: Option<f64>,
 }
 
-#[api(
-    properties: {
-        active: {
-            default: false,
-            optional: true,
-        },
-        avail: {
-            optional: true,
-            type: Integer,
-        },
-        content: {
-            format: &ApiStringFormat::PropertyString(&STORAGE_STATUS_CONTENT),
-            type: String,
-        },
-        enabled: {
-            default: false,
-            optional: true,
-        },
-        shared: {
-            default: false,
-            optional: true,
-        },
-        total: {
-            optional: true,
-            type: Integer,
-        },
-        type: {
-            type: String,
-        },
-        used: {
-            optional: true,
-            type: Integer,
-        },
-    },
-)]
+#[api]
 /// Object.
 #[derive(Debug, serde::Deserialize, serde::Serialize)]
-pub struct StorageStatus {
-    /// Set when storage is accessible.
-    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
-    #[serde(default, skip_serializing_if = "Option::is_none")]
-    pub active: Option<bool>,
-
-    /// Available storage space in bytes.
-    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
-    #[serde(default, skip_serializing_if = "Option::is_none")]
-    pub avail: Option<i64>,
-
-    /// Allowed storage content types.
-    #[serde(with = "storage_status_content")]
-    pub content: Vec<StorageContent>,
-
-    /// Set when storage is enabled (not disabled).
-    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
-    #[serde(default, skip_serializing_if = "Option::is_none")]
-    pub enabled: Option<bool>,
-
-    /// Shared flag from storage configuration.
-    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
-    #[serde(default, skip_serializing_if = "Option::is_none")]
-    pub shared: Option<bool>,
-
-    /// Total storage space in bytes.
-    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
-    #[serde(default, skip_serializing_if = "Option::is_none")]
-    pub total: Option<i64>,
-
-    /// Storage type.
-    #[serde(rename = "type")]
-    pub ty: String,
-
-    /// Used storage space in bytes.
-    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
-    #[serde(default, skip_serializing_if = "Option::is_none")]
-    pub used: Option<i64>,
-}
+pub struct StorageStatus {}
 
 #[api(
     properties: {
-- 
2.47.3



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


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

* [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] remote_updates: fix update info mapper
  2025-10-08  7:31 [pdm-devel] [PATCH proxmox/proxmox-datacenter-manager 0/2] update PVE API spec and fix affected code Hannes Laimer
  2025-10-08  7:31 ` [pdm-devel] [PATCH proxmox 1/1] pve-api: update spec Hannes Laimer
@ 2025-10-08  7:31 ` Hannes Laimer
  1 sibling, 0 replies; 4+ messages in thread
From: Hannes Laimer @ 2025-10-08  7:31 UTC (permalink / raw)
  To: pdm-devel

With new PVE API spec we now have an enum for the arch field in the
AptUpdateInfo struct. The PDM equivalent however does not, this fixes
the mapping from the PVE one to the PDM one.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 server/src/remote_updates.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/server/src/remote_updates.rs b/server/src/remote_updates.rs
index f833062..ed26b11 100644
--- a/server/src/remote_updates.rs
+++ b/server/src/remote_updates.rs
@@ -77,7 +77,10 @@ fn map_pve_update_info(info: pve_api_types::AptUpdateInfo) -> APTUpdateInfo {
     APTUpdateInfo {
         package: info.package,
         title: info.title,
-        arch: info.arch,
+        arch: info.arch.to_string(), // TODO: we get an enum from the PVE API, we should probably
+        // also have one here. Ideally they'd share the same. Or we use the APTUpdateInfo directly
+        // when generating the PVE API types, assuming we can teach the generator to consider
+        // existing types it did not define itself.
         description: info.description,
         version: info.version,
         old_version: info.old_version.unwrap_or_default(),
-- 
2.47.3



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


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

* Re: [pdm-devel] [PATCH proxmox 1/1] pve-api: update spec
  2025-10-08  7:31 ` [pdm-devel] [PATCH proxmox 1/1] pve-api: update spec Hannes Laimer
@ 2025-10-08  8:23   ` Hannes Laimer
  0 siblings, 0 replies; 4+ messages in thread
From: Hannes Laimer @ 2025-10-08  8:23 UTC (permalink / raw)
  To: pdm-devel

please don't apply this. [1] is not yet in the latest pve-storage
version. The latest api spec dump did however already iclude this, so
this patch would remove the generate type.

I still think we should update the spec given the latest changes to the
API though. I'll send a v2

[1] 
https://git.proxmox.com/?p=pve-storage.git;a=commitdiff;h=9eb914de163d5aeeeb384a297df7f31b5848b062;hp=02acde02b68a306b64bb7d025d870f5e82222e2d

On 10/8/25 09:31, Hannes Laimer wrote:
> Update the pve-api.json dump and regenerate since there have been a few
> additions to the API spec, mostly having better types definitions,
> i.e. [1][2]. This also includes the changes from [3], so this does
> depend on that being applied.
> 
> [1] pve-manager: 6deba095 (api: add APT versions return schema)
> [2] pve-manager: 65a80884 (api: add replication config read return schema)
> [3] https://lore.proxmox.com/pve-devel/20251007131113.2785229-1-t.lamprecht@proxmox.com/
> 
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
>   pve-api-types/pve-api.json           | 426 +++++++++++++++++----------
>   pve-api-types/src/generated/types.rs | 211 +++----------
>   2 files changed, 306 insertions(+), 331 deletions(-)
> 
> diff --git a/pve-api-types/pve-api.json b/pve-api-types/pve-api.json
> index 9db8fa13..257c21fb 100644
> --- a/pve-api-types/pve-api.json
> +++ b/pve-api-types/pve-api.json
> @@ -148,7 +148,7 @@
>         "pve-fw-protocol-spec": ("Code")[],
>         "pve-fw-sport-spec": ("Code")[],
>         "pve-groupid": ("Code")[],
> -      "pve-ha-group-node": ("Code")[],
> +      "pve-ha-node": ("Code")[],
>         "pve-ha-resource-id": ("Code")[],
>         "pve-ha-resource-or-vm-id": ("Code")[],
>         "pve-hotplug-features": ("Code")[],
> @@ -1085,16 +1085,6 @@
>                                 "user": "all"
>                              },
>                              "returns": {
> -                              "type": "object"
> -                           }
> -                        },
> -                        "PUT": {
> -                           "allowtoken": 1,
> -                           "description": "Update replication job configuration.",
> -                           "method": "PUT",
> -                           "name": "update",
> -                           "parameters": {
> -                              "additionalProperties": 0,
>                                 "properties": {
>                                    "comment": {
>                                       "description": "Description.",
> @@ -1102,13 +1092,6 @@
>                                       "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,
> @@ -1120,12 +1103,20 @@
>                                       "optional": 1,
>                                       "type": "boolean"
>                                    },
> +                                 "guest": {
> +                                    "description": "Guest ID.",
> +                                    "type": "integer"
> +                                 },
>                                    "id": {
>                                       "description": "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.",
>                                       "format": "pve-replication-job-id",
>                                       "pattern": "[1-9][0-9]{2,8}-\\d{1,9}",
>                                       "type": "string"
>                                    },
> +                                 "jobnum": {
> +                                    "description": "Unique, sequential ID assigned to each job.",
> +                                    "type": "integer"
> +                                 },
>                                    "rate": {
>                                       "description": "Rate limit in mbps (megabytes per second) as floating point number.",
>                                       "minimum": 1,
> @@ -1154,9 +1145,54 @@
>                                       "format": "pve-node",
>                                       "optional": 1,
>                                       "type": "string"
> +                                 },
> +                                 "target": {
> +                                    "description": "Target node.",
> +                                    "format": "pve-node",
> +                                    "optional": 0,
> +                                    "type": "string"
> +                                 },
> +                                 "type": {
> +                                    "description": "Section type.",
> +                                    "enum": [
> +                                       "local"
> +                                    ],
> +                                    "type": "string"
>                                    }
>                                 },
>                                 "type": "object"
> +                           }
> +                        },
> +                        "PUT": {
> +                           "allowtoken": 1,
> +                           "description": "Update replication job configuration.",
> +                           "method": "PUT",
> +                           "name": "update",
> +                           "parameters": {
> +                              "additionalProperties": 0,
> +                              "properties": {
> +                                 "comment": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/comment"],
> +                                 "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": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/disable"],
> +                                 "id": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/id"],
> +                                 "rate": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/rate"],
> +                                 "remove_job": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/remove_job"],
> +                                 "schedule": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/schedule"],
> +                                 "source": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/source"]
> +                              },
> +                              "type": "object"
>                              },
>                              "permissions": {
>                                 "description": "Requires the VM.Replicate permission on /vms/<vmid>.",
> @@ -1189,7 +1225,19 @@
>                        },
>                        "returns": {
>                           "items": {
> -                           "properties": {},
> +                           "properties": {
> +                              "comment": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/comment"],
> +                              "disable": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/disable"],
> +                              "guest": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/guest"],
> +                              "id": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/id"],
> +                              "jobnum": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/jobnum"],
> +                              "rate": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/rate"],
> +                              "remove_job": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/remove_job"],
> +                              "schedule": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/schedule"],
> +                              "source": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/source"],
> +                              "target": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/target"],
> +                              "type": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/type"]
> +                           },
>                              "type": "object"
>                           },
>                           "links": [
> @@ -1209,26 +1257,20 @@
>                        "parameters": {
>                           "additionalProperties": 0,
>                           "properties": {
> -                           "comment": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/comment"],
> -                           "disable": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/disable"],
> -                           "id": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/id"],
> -                           "rate": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/rate"],
> -                           "remove_job": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/remove_job"],
> -                           "schedule": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/schedule"],
> -                           "source": ("Ref")["/root/0/children/0/children/0/info/PUT/parameters/properties/source"],
> +                           "comment": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/comment"],
> +                           "disable": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/disable"],
> +                           "id": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/id"],
> +                           "rate": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/rate"],
> +                           "remove_job": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/remove_job"],
> +                           "schedule": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/schedule"],
> +                           "source": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/source"],
>                              "target": {
>                                 "description": "Target node.",
>                                 "format": "pve-node",
>                                 "optional": 0,
>                                 "type": "string"
>                              },
> -                           "type": {
> -                              "description": "Section type.",
> -                              "enum": [
> -                                 "local"
> -                              ],
> -                              "type": "string"
> -                           }
> +                           "type": ("Ref")["/root/0/children/0/children/0/info/GET/returns/properties/type"]
>                           },
>                           "type": "object"
>                        },
> @@ -6185,10 +6227,10 @@
>                                       "type": "boolean"
>                                    },
>                                    "enable": {
> +                                    "default": 0,
>                                       "description": "Enable or disable the firewall cluster wide.",
> -                                    "minimum": 0,
>                                       "optional": 1,
> -                                    "type": "integer"
> +                                    "type": "boolean"
>                                    },
>                                    "log_ratelimit": {
>                                       "description": "Log ratelimiting settings",
> @@ -6272,7 +6314,12 @@
>                                       "type": "string"
>                                    },
>                                    "ebtables": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/ebtables"],
> -                                 "enable": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/enable"],
> +                                 "enable": {
> +                                    "description": "Enable or disable the firewall cluster wide.",
> +                                    "minimum": 0,
> +                                    "optional": 1,
> +                                    "type": "integer"
> +                                 },
>                                    "log_ratelimit": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/log_ratelimit"],
>                                    "policy_forward": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/policy_forward"],
>                                    "policy_in": ("Ref")["/root/0/children/4/children/4/info/GET/returns/properties/policy_in"],
> @@ -7714,11 +7761,11 @@
>                                          },
>                                          "nodes": {
>                                             "description": "List of cluster node names with optional priority.",
> -                                          "format": "pve-ha-group-node-list",
> +                                          "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 bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
> +                                          "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."
>                                          },
>                                          "nofailback": {
>                                             "default": 0,
> @@ -7805,11 +7852,11 @@
>                                    "group": ("Ref")["/root/0/children/7/children/1/children/0/info/PUT/parameters/properties/group"],
>                                    "nodes": {
>                                       "description": "List of cluster node names with optional priority.",
> -                                    "format": "pve-ha-group-node-list",
> +                                    "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 bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
> +                                    "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."
>                                    },
>                                    "nofailback": ("Ref")["/root/0/children/7/children/1/children/0/info/PUT/parameters/properties/nofailback"],
>                                    "restricted": ("Ref")["/root/0/children/7/children/1/children/0/info/PUT/parameters/properties/restricted"],
> @@ -7969,7 +8016,7 @@
>                                          "nodes": {
>                                             "completion": ("Code")[],
>                                             "description": "List of cluster node names with optional priority.",
> -                                          "format": "pve-ha-group-node-list",
> +                                          "format": "pve-ha-node-list",
>                                             "instance-types": [
>                                                "node-affinity"
>                                             ],
> @@ -7977,7 +8024,7 @@
>                                             "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 bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
> +                                          "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")[],
> @@ -8121,7 +8168,7 @@
>                                    "nodes": {
>                                       "completion": ("Code")[],
>                                       "description": "List of cluster node names with optional priority.",
> -                                    "format": "pve-ha-group-node-list",
> +                                    "format": "pve-ha-node-list",
>                                       "instance-types": [
>                                          "node-affinity"
>                                       ],
> @@ -8129,7 +8176,7 @@
>                                       "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 bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only. The higher the number, the higher the priority."
> +                                    "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")[],
> @@ -8453,15 +8500,6 @@
>                                    },
>                                    "protected": 1,
>                                    "returns": {
> -                                    "type": "object"
> -                                 }
> -                              },
> -                              "PUT": {
> -                                 "allowtoken": 1,
> -                                 "description": "Update ACME plugin configuration.",
> -                                 "method": "PUT",
> -                                 "name": "update_plugin",
> -                                 "parameters": {
>                                       "additionalProperties": 0,
>                                       "properties": {
>                                          "api": {
> @@ -8633,19 +8671,6 @@
>                                             "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": "Flag to disable the config.",
>                                             "optional": 1,
> @@ -8662,6 +8687,14 @@
>                                             "optional": 1,
>                                             "type": "string"
>                                          },
> +                                       "type": {
> +                                          "description": "ACME challenge type.",
> +                                          "enum": [
> +                                             "dns",
> +                                             "standalone"
> +                                          ],
> +                                          "type": "string"
> +                                       },
>                                          "validation-delay": {
>                                             "default": 30,
>                                             "description": "Extra delay in seconds to wait before requesting validation. Allows to cope with a long TTL of DNS records.",
> @@ -8672,6 +8705,37 @@
>                                          }
>                                       },
>                                       "type": "object"
> +                                 }
> +                              },
> +                              "PUT": {
> +                                 "allowtoken": 1,
> +                                 "description": "Update ACME plugin configuration.",
> +                                 "method": "PUT",
> +                                 "name": "update_plugin",
> +                                 "parameters": {
> +                                    "additionalProperties": 0,
> +                                    "properties": {
> +                                       "api": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/api"],
> +                                       "data": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/data"],
> +                                       "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": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/disable"],
> +                                       "id": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/id"],
> +                                       "nodes": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/nodes"],
> +                                       "validation-delay": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns/properties/validation-delay"]
> +                                    },
> +                                    "type": "object"
>                                    },
>                                    "permissions": {
>                                       "check": [
> @@ -8724,16 +8788,7 @@
>                              },
>                              "protected": 1,
>                              "returns": {
> -                              "items": {
> -                                 "properties": {
> -                                    "plugin": {
> -                                       "description": "Unique identifier for ACME plugin instance.",
> -                                       "format": "pve-configid",
> -                                       "type": "string"
> -                                    }
> -                                 },
> -                                 "type": "object"
> -                              },
> +                              "items": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns"],
>                                 "links": [
>                                    {
>                                       "href": "{plugin}",
> @@ -8748,26 +8803,7 @@
>                              "description": "Add ACME plugin configuration.",
>                              "method": "POST",
>                              "name": "add_plugin",
> -                           "parameters": {
> -                              "additionalProperties": 0,
> -                              "properties": {
> -                                 "api": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/api"],
> -                                 "data": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/data"],
> -                                 "disable": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/disable"],
> -                                 "id": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/id"],
> -                                 "nodes": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/nodes"],
> -                                 "type": {
> -                                    "description": "ACME challenge type.",
> -                                    "enum": [
> -                                       "dns",
> -                                       "standalone"
> -                                    ],
> -                                    "type": "string"
> -                                 },
> -                                 "validation-delay": ("Ref")["/root/0/children/8/children/0/children/0/info/PUT/parameters/properties/validation-delay"]
> -                              },
> -                              "type": "object"
> -                           },
> +                           "parameters": ("Ref")["/root/0/children/8/children/0/children/0/info/GET/returns"],
>                              "permissions": {
>                                 "check": [
>                                    "perm",
> @@ -15573,6 +15609,7 @@
>                           }
>                        },
>                        "permissions": {
> +                        "description": "The user needs 'Sys.Syslog' on '/' in order to get all logs.",
>                           "user": "all"
>                        },
>                        "returns": {
> @@ -20283,6 +20320,7 @@
>                                                   "type": "boolean"
>                                                },
>                                                "ostype": {
> +                                                "default": "other",
>                                                   "description": "Specify guest operating system.",
>                                                   "enum": [
>                                                      "other",
> @@ -43059,7 +43097,89 @@
>                                          "protected": 1,
>                                          "proxyto": "node",
>                                          "returns": {
> -                                          "properties": {},
> +                                          "properties": {
> +                                             "active-state": {
> +                                                "description": "Current state of the service process (systemd ActiveState).",
> +                                                "enum": [
> +                                                   "active",
> +                                                   "inactive",
> +                                                   "failed",
> +                                                   "activating",
> +                                                   "deactivating",
> +                                                   "maintenance",
> +                                                   "reloading",
> +                                                   "refreshing",
> +                                                   "unknown"
> +                                                ],
> +                                                "type": "string"
> +                                             },
> +                                             "desc": {
> +                                                "description": "Description of the service.",
> +                                                "type": "string"
> +                                             },
> +                                             "name": {
> +                                                "description": "Short identifier for the service (e.g., \"pveproxy\").",
> +                                                "type": "string"
> +                                             },
> +                                             "service": {
> +                                                "description": "Systemd unit name (e.g., pveproxy).",
> +                                                "type": "string"
> +                                             },
> +                                             "state": {
> +                                                "description": "Execution status of the service (systemd SubState).",
> +                                                "enum": [
> +                                                   "dead",
> +                                                   "condition",
> +                                                   "start-pre",
> +                                                   "start",
> +                                                   "start-post",
> +                                                   "running",
> +                                                   "exited",
> +                                                   "reload",
> +                                                   "reload-signal",
> +                                                   "reload-notify",
> +                                                   "mounting",
> +                                                   "stop",
> +                                                   "stop-watchdog",
> +                                                   "stop-sigterm",
> +                                                   "stop-sigkill",
> +                                                   "stop-post",
> +                                                   "final-watchdog",
> +                                                   "final-sigterm",
> +                                                   "final-sigkill",
> +                                                   "failed",
> +                                                   "dead-before-auto-restart",
> +                                                   "failed-before-auto-restart",
> +                                                   "dead-resources-pinned",
> +                                                   "auto-restart",
> +                                                   "auto-restart-queued",
> +                                                   "cleaning",
> +                                                   "unknown"
> +                                                ],
> +                                                "type": "string"
> +                                             },
> +                                             "unit-state": {
> +                                                "description": "Whether the service is enabled (systemd UnitFileState).",
> +                                                "enum": [
> +                                                   "enabled",
> +                                                   "enabled-runtime",
> +                                                   "linked",
> +                                                   "linked-runtime",
> +                                                   "alias",
> +                                                   "masked",
> +                                                   "masked-runtime",
> +                                                   "static",
> +                                                   "disabled",
> +                                                   "indirect",
> +                                                   "generated",
> +                                                   "transient",
> +                                                   "bad",
> +                                                   "not-found",
> +                                                   "unknown"
> +                                                ],
> +                                                "type": "string"
> +                                             }
> +                                          },
>                                             "type": "object"
>                                          }
>                                       }
> @@ -43300,7 +43420,7 @@
>                              "proxyto": "node",
>                              "returns": {
>                                 "items": {
> -                                 "properties": {},
> +                                 "properties": ("Ref")["/root/1/children/0/children/4/children/0/children/0/info/GET/returns/properties"],
>                                    "type": "object"
>                                 },
>                                 "links": [
> @@ -46369,50 +46489,7 @@
>                                          "protected": 1,
>                                          "proxyto": "node",
>                                          "returns": {
> -                                          "properties": {
> -                                             "active": {
> -                                                "description": "Set when storage is accessible.",
> -                                                "optional": 1,
> -                                                "type": "boolean"
> -                                             },
> -                                             "avail": {
> -                                                "description": "Available storage space in bytes.",
> -                                                "optional": 1,
> -                                                "renderer": "bytes",
> -                                                "type": "integer"
> -                                             },
> -                                             "content": {
> -                                                "description": "Allowed storage content types.",
> -                                                "format": "pve-storage-content-list",
> -                                                "type": "string"
> -                                             },
> -                                             "enabled": {
> -                                                "description": "Set when storage is enabled (not disabled).",
> -                                                "optional": 1,
> -                                                "type": "boolean"
> -                                             },
> -                                             "shared": {
> -                                                "description": "Shared flag from storage configuration.",
> -                                                "optional": 1,
> -                                                "type": "boolean"
> -                                             },
> -                                             "total": {
> -                                                "description": "Total storage space in bytes.",
> -                                                "optional": 1,
> -                                                "renderer": "bytes",
> -                                                "type": "integer"
> -                                             },
> -                                             "type": {
> -                                                "description": "Storage type.",
> -                                                "type": "string"
> -                                             },
> -                                             "used": {
> -                                                "description": "Used storage space in bytes.",
> -                                                "optional": 1,
> -                                                "renderer": "bytes",
> -                                                "type": "integer"
> -                                             }
> -                                          },
> +                                          "properties": {},
>                                             "type": "object"
>                                          }
>                                       }
> @@ -48298,10 +48375,18 @@
>                                          "properties": {
>                                             "Arch": {
>                                                "description": "Package Architecture.",
> +                                             "enum": [
> +                                                "armhf",
> +                                                "arm64",
> +                                                "amd64",
> +                                                "ppc64el",
> +                                                "risc64",
> +                                                "s390x"
> +                                             ],
>                                                "type": "string"
>                                             },
>                                             "Description": {
> -                                             "description": "Human-readable package description.",
> +                                             "description": "Package description.",
>                                                "type": "string"
>                                             },
>                                             "NotifyStatus": {
> @@ -48315,7 +48400,7 @@
>                                                "type": "string"
>                                             },
>                                             "Origin": {
> -                                             "description": "Package origin.",
> +                                             "description": "Package origin, e.g., 'Proxmox' or 'Debian'.",
>                                                "type": "string"
>                                             },
>                                             "Package": {
> @@ -48323,7 +48408,7 @@
>                                                "type": "string"
>                                             },
>                                             "Priority": {
> -                                             "description": "Package priority in human-readable form.",
> +                                             "description": "Package priority.",
>                                                "type": "string"
>                                             },
>                                             "Section": {
> @@ -48772,7 +48857,40 @@
>                                    "proxyto": "node",
>                                    "returns": {
>                                       "items": {
> -                                       "properties": {},
> +                                       "properties": {
> +                                          "Arch": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Arch"],
> +                                          "CurrentState": {
> +                                             "description": "Current state of the package installed on the system.",
> +                                             "enum": [
> +                                                "Installed",
> +                                                "NotInstalled",
> +                                                "UnPacked",
> +                                                "HalfConfigured",
> +                                                "HalfInstalled",
> +                                                "ConfigFiles"
> +                                             ],
> +                                             "type": "string"
> +                                          },
> +                                          "Description": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Description"],
> +                                          "ManagerVersion": {
> +                                             "description": "Version of the currently running pve-manager API server.",
> +                                             "optional": 1,
> +                                             "type": "string"
> +                                          },
> +                                          "NotifyStatus": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/NotifyStatus"],
> +                                          "OldVersion": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/OldVersion"],
> +                                          "Origin": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Origin"],
> +                                          "Package": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Package"],
> +                                          "Priority": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Priority"],
> +                                          "RunningKernel": {
> +                                             "description": "Kernel release, only for package 'proxmox-ve'.",
> +                                             "optional": 1,
> +                                             "type": "string"
> +                                          },
> +                                          "Section": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Section"],
> +                                          "Title": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Title"],
> +                                          "Version": ("Ref")["/root/1/children/0/children/13/children/0/info/GET/returns/items/properties/Version"]
> +                                       },
>                                          "type": "object"
>                                       },
>                                       "type": "array"
> @@ -49286,6 +49404,7 @@
>                                    "returns": {
>                                       "properties": {
>                                          "enable": {
> +                                          "default": 1,
>                                             "description": "Enable host firewall rules.",
>                                             "optional": 1,
>                                             "type": "boolean"
> @@ -52601,12 +52720,6 @@
>                                 "optional": 1,
>                                 "type": "string"
>                              },
> -                           "path": {
> -                              "description": "File system path.",
> -                              "format": "pve-storage-path",
> -                              "optional": 1,
> -                              "type": "string"
> -                           },
>                              "pool": {
>                                 "description": "Pool.",
>                                 "optional": 1,
> @@ -52765,7 +52878,6 @@
>                                    "nfs",
>                                    "pbs",
>                                    "rbd",
> -                                 "xfsrs-example",
>                                    "zfs",
>                                    "zfspool"
>                                 ],
> @@ -52886,7 +52998,12 @@
>                        "nowritecache": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/nowritecache"],
>                        "options": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/options"],
>                        "password": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/password"],
> -                     "path": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/path"],
> +                     "path": {
> +                        "description": "File system path.",
> +                        "format": "pve-storage-path",
> +                        "optional": 1,
> +                        "type": "string"
> +                     },
>                        "pool": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/pool"],
>                        "port": ("Ref")["/root/2/children/0/info/PUT/parameters/properties/port"],
>                        "portal": {
> @@ -52939,7 +53056,6 @@
>                              "nfs",
>                              "pbs",
>                              "rbd",
> -                           "xfsrs-example",
>                              "zfs",
>                              "zfspool"
>                           ],
> diff --git a/pve-api-types/src/generated/types.rs b/pve-api-types/src/generated/types.rs
> index 2979e708..94b0ba15 100644
> --- a/pve-api-types/src/generated/types.rs
> +++ b/pve-api-types/src/generated/types.rs
> @@ -1,7 +1,7 @@
>   #[api(
>       properties: {
>           Arch: {
> -            type: String,
> +            type: AptUpdateInfoArch,
>           },
>           Description: {
>               type: String,
> @@ -37,11 +37,10 @@
>   /// Object.
>   #[derive(Debug, serde::Deserialize, serde::Serialize)]
>   pub struct AptUpdateInfo {
> -    /// Package Architecture.
>       #[serde(rename = "Arch")]
> -    pub arch: String,
> +    pub arch: AptUpdateInfoArch,
>   
> -    /// Human-readable package description.
> +    /// Package description.
>       #[serde(rename = "Description")]
>       pub description: String,
>   
> @@ -55,7 +54,7 @@ pub struct AptUpdateInfo {
>       #[serde(rename = "OldVersion")]
>       pub old_version: Option<String>,
>   
> -    /// Package origin.
> +    /// Package origin, e.g., 'Proxmox' or 'Debian'.
>       #[serde(rename = "Origin")]
>       pub origin: String,
>   
> @@ -63,7 +62,7 @@ pub struct AptUpdateInfo {
>       #[serde(rename = "Package")]
>       pub package: String,
>   
> -    /// Package priority in human-readable form.
> +    /// Package priority.
>       #[serde(rename = "Priority")]
>       pub priority: String,
>   
> @@ -80,6 +79,32 @@ pub struct AptUpdateInfo {
>       pub version: String,
>   }
>   
> +#[api]
> +/// Package Architecture.
> +#[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
> +pub enum AptUpdateInfoArch {
> +    #[serde(rename = "armhf")]
> +    /// armhf.
> +    Armhf,
> +    #[serde(rename = "arm64")]
> +    /// arm64.
> +    Arm64,
> +    #[serde(rename = "amd64")]
> +    /// amd64.
> +    Amd64,
> +    #[serde(rename = "ppc64el")]
> +    /// ppc64el.
> +    Ppc64el,
> +    #[serde(rename = "risc64")]
> +    /// risc64.
> +    Risc64,
> +    #[serde(rename = "s390x")]
> +    /// s390x.
> +    S390x,
> +}
> +serde_plain::derive_display_from_serialize!(AptUpdateInfoArch);
> +serde_plain::derive_fromstr_from_deserialize!(AptUpdateInfoArch);
> +
>   #[api(
>       properties: {
>           notify: {
> @@ -7636,9 +7661,10 @@ serde_plain::derive_fromstr_from_deserialize!(QemuConfigNumaPolicy);
>   
>   #[api]
>   /// Specify guest operating system.
> -#[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
> +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
>   pub enum QemuConfigOstype {
>       #[serde(rename = "other")]
> +    #[default]
>       /// other.
>       Other,
>       #[serde(rename = "wxp")]
> @@ -9909,101 +9935,6 @@ mod storage_info_content {
>       }
>   }
>   
> -const STORAGE_STATUS_CONTENT: Schema =
> -    proxmox_schema::ArraySchema::new("list", &StorageContent::API_SCHEMA).schema();
> -
> -mod storage_status_content {
> -    use serde::{Deserialize, Deserializer, Serialize, Serializer};
> -
> -    #[doc(hidden)]
> -    pub trait Ser: Sized {
> -        fn ser<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>;
> -        fn de<'de, D>(deserializer: D) -> Result<Self, D::Error>
> -        where
> -            D: Deserializer<'de>;
> -    }
> -
> -    impl<T: Serialize + for<'a> Deserialize<'a>> Ser for Vec<T> {
> -        fn ser<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
> -        where
> -            S: Serializer,
> -        {
> -            super::stringlist::serialize(&self[..], serializer, &super::STORAGE_STATUS_CONTENT)
> -        }
> -
> -        fn de<'de, D>(deserializer: D) -> Result<Self, D::Error>
> -        where
> -            D: Deserializer<'de>,
> -        {
> -            super::stringlist::deserialize(deserializer, &super::STORAGE_STATUS_CONTENT)
> -        }
> -    }
> -
> -    impl<T: Ser> Ser for Option<T> {
> -        fn ser<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
> -        where
> -            S: Serializer,
> -        {
> -            match self {
> -                None => serializer.serialize_none(),
> -                Some(inner) => inner.ser(serializer),
> -            }
> -        }
> -
> -        fn de<'de, D>(deserializer: D) -> Result<Self, D::Error>
> -        where
> -            D: Deserializer<'de>,
> -        {
> -            use std::fmt;
> -            use std::marker::PhantomData;
> -
> -            struct V<T: Ser>(PhantomData<T>);
> -
> -            impl<'de, T: Ser> serde::de::Visitor<'de> for V<T> {
> -                type Value = Option<T>;
> -
> -                fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
> -                    f.write_str("an optional string")
> -                }
> -
> -                fn visit_none<E: serde::de::Error>(self) -> Result<Self::Value, E> {
> -                    Ok(None)
> -                }
> -
> -                fn visit_some<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
> -                where
> -                    D: Deserializer<'de>,
> -                {
> -                    T::de(deserializer).map(Some)
> -                }
> -
> -                fn visit_str<E: serde::de::Error>(self, value: &str) -> Result<Self::Value, E> {
> -                    use serde::de::IntoDeserializer;
> -                    T::de(value.into_deserializer()).map(Some)
> -                }
> -            }
> -
> -            deserializer.deserialize_option(V::<T>(PhantomData))
> -        }
> -    }
> -
> -    pub fn serialize<T, S>(this: &T, serializer: S) -> Result<S::Ok, S::Error>
> -    where
> -        S: serde::Serializer,
> -        T: Ser,
> -    {
> -        this.ser(serializer)
> -    }
> -
> -    pub fn deserialize<'de, T, D>(deserializer: D) -> Result<T, D::Error>
> -    where
> -        D: serde::Deserializer<'de>,
> -        T: Ser,
> -    {
> -        T::de(deserializer)
> -    }
> -}
> -
>   const_regex! {
>   
>   SDN_CONTROLLER_ISIS_IFACES_RE = r##"^[a-zA-Z][a-zA-Z0-9_]{1,20}([:\.]\d+)?$"##;
> @@ -11382,82 +11313,10 @@ pub struct StorageInfo {
>       pub used_fraction: Option<f64>,
>   }
>   
> -#[api(
> -    properties: {
> -        active: {
> -            default: false,
> -            optional: true,
> -        },
> -        avail: {
> -            optional: true,
> -            type: Integer,
> -        },
> -        content: {
> -            format: &ApiStringFormat::PropertyString(&STORAGE_STATUS_CONTENT),
> -            type: String,
> -        },
> -        enabled: {
> -            default: false,
> -            optional: true,
> -        },
> -        shared: {
> -            default: false,
> -            optional: true,
> -        },
> -        total: {
> -            optional: true,
> -            type: Integer,
> -        },
> -        type: {
> -            type: String,
> -        },
> -        used: {
> -            optional: true,
> -            type: Integer,
> -        },
> -    },
> -)]
> +#[api]
>   /// Object.
>   #[derive(Debug, serde::Deserialize, serde::Serialize)]
> -pub struct StorageStatus {
> -    /// Set when storage is accessible.
> -    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
> -    #[serde(default, skip_serializing_if = "Option::is_none")]
> -    pub active: Option<bool>,
> -
> -    /// Available storage space in bytes.
> -    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
> -    #[serde(default, skip_serializing_if = "Option::is_none")]
> -    pub avail: Option<i64>,
> -
> -    /// Allowed storage content types.
> -    #[serde(with = "storage_status_content")]
> -    pub content: Vec<StorageContent>,
> -
> -    /// Set when storage is enabled (not disabled).
> -    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
> -    #[serde(default, skip_serializing_if = "Option::is_none")]
> -    pub enabled: Option<bool>,
> -
> -    /// Shared flag from storage configuration.
> -    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")]
> -    #[serde(default, skip_serializing_if = "Option::is_none")]
> -    pub shared: Option<bool>,
> -
> -    /// Total storage space in bytes.
> -    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
> -    #[serde(default, skip_serializing_if = "Option::is_none")]
> -    pub total: Option<i64>,
> -
> -    /// Storage type.
> -    #[serde(rename = "type")]
> -    pub ty: String,
> -
> -    /// Used storage space in bytes.
> -    #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")]
> -    #[serde(default, skip_serializing_if = "Option::is_none")]
> -    pub used: Option<i64>,
> -}
> +pub struct StorageStatus {}
>   
>   #[api(
>       properties: {



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


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

end of thread, other threads:[~2025-10-08  8:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-08  7:31 [pdm-devel] [PATCH proxmox/proxmox-datacenter-manager 0/2] update PVE API spec and fix affected code Hannes Laimer
2025-10-08  7:31 ` [pdm-devel] [PATCH proxmox 1/1] pve-api: update spec Hannes Laimer
2025-10-08  8:23   ` Hannes Laimer
2025-10-08  7:31 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] remote_updates: fix update info mapper Hannes Laimer

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