From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 9F9541FF183 for ; Wed, 8 Oct 2025 10:24:20 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D022AF4C; Wed, 8 Oct 2025 10:24:25 +0200 (CEST) Message-ID: <3498b532-6c66-460d-8314-6501c4b37383@proxmox.com> Date: Wed, 8 Oct 2025 10:23:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Hannes Laimer To: pdm-devel@lists.proxmox.com References: <20251008073107.102213-1-h.laimer@proxmox.com> <20251008073107.102213-2-h.laimer@proxmox.com> Content-Language: en-US In-Reply-To: <20251008073107.102213-2-h.laimer@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1759911797328 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.043 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [types.rs, proxmox.com] Subject: Re: [pdm-devel] [PATCH proxmox 1/1] pve-api: update spec X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "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 > --- > 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. '-'.", > "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/.", > @@ -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": "[:]{,[:]}*", > - "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": "[:]{,[:]}*", > - "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": "[:]{,[:]}*", > - "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": "[:]{,[:]}*", > - "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, > > - /// 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(&self, serializer: S) -> Result; > - fn de<'de, D>(deserializer: D) -> Result > - where > - D: Deserializer<'de>; > - } > - > - impl Deserialize<'a>> Ser for Vec { > - fn ser(&self, serializer: S) -> Result > - where > - S: Serializer, > - { > - super::stringlist::serialize(&self[..], serializer, &super::STORAGE_STATUS_CONTENT) > - } > - > - fn de<'de, D>(deserializer: D) -> Result > - where > - D: Deserializer<'de>, > - { > - super::stringlist::deserialize(deserializer, &super::STORAGE_STATUS_CONTENT) > - } > - } > - > - impl Ser for Option { > - fn ser(&self, serializer: S) -> Result > - where > - S: Serializer, > - { > - match self { > - None => serializer.serialize_none(), > - Some(inner) => inner.ser(serializer), > - } > - } > - > - fn de<'de, D>(deserializer: D) -> Result > - where > - D: Deserializer<'de>, > - { > - use std::fmt; > - use std::marker::PhantomData; > - > - struct V(PhantomData); > - > - impl<'de, T: Ser> serde::de::Visitor<'de> for V { > - type Value = Option; > - > - fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result { > - f.write_str("an optional string") > - } > - > - fn visit_none(self) -> Result { > - Ok(None) > - } > - > - fn visit_some(self, deserializer: D) -> Result > - where > - D: Deserializer<'de>, > - { > - T::de(deserializer).map(Some) > - } > - > - fn visit_str(self, value: &str) -> Result { > - use serde::de::IntoDeserializer; > - T::de(value.into_deserializer()).map(Some) > - } > - } > - > - deserializer.deserialize_option(V::(PhantomData)) > - } > - } > - > - pub fn serialize(this: &T, serializer: S) -> Result > - where > - S: serde::Serializer, > - T: Ser, > - { > - this.ser(serializer) > - } > - > - pub fn deserialize<'de, T, D>(deserializer: D) -> Result > - 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, > } > > -#[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, > - > - /// Available storage space in bytes. > - #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")] > - #[serde(default, skip_serializing_if = "Option::is_none")] > - pub avail: Option, > - > - /// Allowed storage content types. > - #[serde(with = "storage_status_content")] > - pub content: Vec, > - > - /// 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, > - > - /// Shared flag from storage configuration. > - #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")] > - #[serde(default, skip_serializing_if = "Option::is_none")] > - pub shared: Option, > - > - /// Total storage space in bytes. > - #[serde(deserialize_with = "proxmox_serde::perl::deserialize_i64")] > - #[serde(default, skip_serializing_if = "Option::is_none")] > - pub total: Option, > - > - /// 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, > -} > +pub struct StorageStatus {} > > #[api( > properties: { _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel