From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id CE3F81FF0AA for ; Tue, 17 Nov 2026 19:36:07 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id B64D12170B; Tue, 17 Nov 2026 19:35:34 +0100 (CET) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Subject: [PATCH pve-network v2 09/11] api: fabric status: add schema for wireguard properties Date: Tue, 17 Nov 2026 19:34:56 +0100 Message-ID: <20261117183500.750636-10-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261117183500.750636-1-s.hanreich@proxmox.com> References: <20261117183500.750636-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: 1794940507681 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.256 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: B7T55D4KXNF3SX3V7SKHR2MH37AFEVGF X-Message-ID-Hash: B7T55D4KXNF3SX3V7SKHR2MH37AFEVGF 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 | 80 +++++++++++++++++++++++- 1 file changed, 77 insertions(+), 3 deletions(-) diff --git a/src/PVE/API2/Network/SDN/Nodes/Fabric.pm b/src/PVE/API2/Network/SDN/Nodes/Fabric.pm index 0202b81..f1d9594 100644 --- a/src/PVE/API2/Network/SDN/Nodes/Fabric.pm +++ b/src/PVE/API2/Network/SDN/Nodes/Fabric.pm @@ -115,17 +115,80 @@ __PACKAGE__->register_method({ type => "object", properties => { neighbor => { - description => "The IP or hostname of the neighbor.", + description => + "The IP or hostname of the neighbor. For WireGuard, the endpoint" + . " currently used, including the port. Omitted for WireGuard peers" + . " without a known endpoint.", + format_description => '(|)[:]', type => 'string', + optional => 1, }, status => { - description => "The status of the neighbor, as returned by FRR.", + description => + "The status of the neighbor. As returned by FRR for OSPF, Openfabric and" + . " BGP. For WireGuard, derived from the latest handshake: 'active' if" + . " the peer has a recent session, 'down' if it is unreachable despite" + . " persistent keepalive, 'idle' otherwise.", type => 'string', }, 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. Omitted for peers" + . " that are not part of the fabric configuration. (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, omitted if there are none (WireGuard only)", + type => 'string', + format_description => 'Comma-separated list of CIDRs.', + optional => 1, + }, + 'latest-handshake' => { + description => + "UNIX Timestamp of the last successful handshake, omitted if no handshake" + . " happened yet (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," + . " omitted if disabled (WireGuard only)", + type => 'number', + optional => 1, }, }, }, @@ -173,6 +236,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