From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 3EC7C1FF14F for ; Wed, 17 Jun 2026 13:10:49 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 354DD1F3FF; Wed, 17 Jun 2026 13:10:36 +0200 (CEST) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Subject: [PATCH pve-network 11/13] api: fabric status: add schema for wireguard properties Date: Wed, 17 Jun 2026 13:10:08 +0200 Message-ID: <20260617111012.312710-12-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260617111012.312710-1-s.hanreich@proxmox.com> References: <20260617111012.312710-1-s.hanreich@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1781694569046 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.597 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: DAKHNLALVQO5XEFG6MUWPCJ4EQBFCZEH X-Message-ID-Hash: DAKHNLALVQO5XEFG6MUWPCJ4EQBFCZEH X-MailFrom: s.hanreich@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The WireGuard fabric returns lots of addtional options in status reporting, add the properties to the return schema. Additionally, improve the description of the existing properties, so the format is more clear. Signed-off-by: Stefan Hanreich --- src/PVE/API2/Network/SDN/Nodes/Fabric.pm | 71 +++++++++++++++++++++++- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/src/PVE/API2/Network/SDN/Nodes/Fabric.pm b/src/PVE/API2/Network/SDN/Nodes/Fabric.pm index 0202b81e..28aa2030 100644 --- a/src/PVE/API2/Network/SDN/Nodes/Fabric.pm +++ b/src/PVE/API2/Network/SDN/Nodes/Fabric.pm @@ -115,17 +115,71 @@ __PACKAGE__->register_method({ type => "object", properties => { neighbor => { - description => "The IP or hostname of the neighbor.", + description => "The IP or hostname of the neighbor (including the port for WireGuard).", + format_description => '(|)[:]', type => 'string', }, status => { - description => "The status of the neighbor, as returned by FRR.", + description => "The status of the neighbor, as returned by FRR (OSPF, Openfabric, BGP only)", type => 'string', + optional => 1, }, uptime => { description => - "The uptime of this neighbor, as returned by FRR (e.g. 8h24m12s).", + "The uptime of this neighbor, as returned by FRR, e.g. 8h24m12s (OSPF, Openfabric, BGP only)", type => 'string', + optional => 1, + }, + name => { + description => + "The name for this neighbor in the WireGuard fabric. (WireGuard only)", + format_description => '(|)[ ()]', + type => 'string', + optional => 1, + }, + interface => { + description => + "The name of the interface that uses this neighbor as peer (WireGuard only)", + type => 'string', + optional => 1, + }, + 'public-key' => { + description => + "The public key used for this neighbor (WireGuard only)", + format_description => 'Base64-encoded Curve 25519 public key.', + type => 'string', + optional => 1, + }, + 'allowed-ips' => { + description => + "The allowed IPs for this neighbor (WireGuard only)", + type => 'string', + format_description => 'Comma-separated list of CIDRs.', + optional => 1, + }, + 'latest-handshake' => { + description => + "UNIX Timestamp of the last successful handshake (WireGuard only)", + type => 'number', + optional => 1, + }, + 'bytes-rx' => { + description => + "The amount of bytes received from this neighbor (WireGuard only)", + type => 'number', + optional => 1, + }, + 'bytes-tx' => { + description => + "The amount of bytes transmitted to this neighbor (WireGuard only)", + type => 'number', + optional => 1, + }, + 'persistent-keepalive' => { + description => + "The currently used persistent keepalive interval for this neighbor (WireGuard only)", + type => 'number', + optional => 1, }, }, }, @@ -173,6 +227,17 @@ __PACKAGE__->register_method({ description => "The current state of the interface.", type => 'string', }, + 'public-key' => { + description => "The public key of the interface (WireGuard only).", + format_description => 'Base64-encoded Curve 25519 public key.', + type => 'string', + optional => 1, + }, + 'listen-port' => { + description => "The listen port of the interface (WireGuard only).", + type => 'number', + optional => 1, + }, }, }, }, -- 2.47.3