public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
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	[thread overview]
Message-ID: <20261117183500.750636-10-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20261117183500.750636-1-s.hanreich@proxmox.com>

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 <s.hanreich@proxmox.com>
---
 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 => '(<IP>|<Host>)[:<port>]',
                     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 => '<node>[ (<interface>)]',
+                    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





  parent reply	other threads:[~2026-11-17 18:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 18:34 [PATCH docs/manager/network/proxmox{,-ve-rs,-perl-rs} v2 00/11] Status reporting for WireGuard fabrics Stefan Hanreich
2026-11-17 18:34 ` [PATCH proxmox v2 01/11] network-api: add missing getters Stefan Hanreich
2026-11-17 18:34 ` [PATCH proxmox v2 02/11] network-api: add support for parsing interface flags Stefan Hanreich
2026-11-17 18:34 ` [PATCH proxmox v2 03/11] wireguard: derive additional traits for public key Stefan Hanreich
2026-11-17 18:34 ` [PATCH proxmox-ve-rs v2 04/11] ve-config: sdn: wireguard: add getters for interface listen port and " Stefan Hanreich
2026-11-17 18:34 ` [PATCH proxmox-ve-rs v2 05/11] ve-config: sdn: wireguard: add helper for resolving the peers of an interface Stefan Hanreich
2026-11-17 18:34 ` [PATCH proxmox-perl-rs v2 06/11] sdn status: fabrics: add status reporting for wireguard Stefan Hanreich
2026-11-17 18:34 ` [PATCH proxmox-perl-rs v2 07/11] sdn status: fabrics: check interfaces and peers for wireguard status Stefan Hanreich
2026-11-17 18:34 ` [PATCH proxmox-perl-rs v2 08/11] sdn status: fabrics: report status of wireguard neighbors Stefan Hanreich
2026-11-17 18:34 ` Stefan Hanreich [this message]
2026-11-17 18:34 ` [PATCH pve-manager v2 10/11] ui: fabric content: add wireguard protocol Stefan Hanreich
2026-11-17 18:34 ` [PATCH pve-docs v2 11/11] sdn: add documentation for wireguard status reporting Stefan Hanreich
2026-11-18 15:20 ` [PATCH docs/manager/network/proxmox{,-ve-rs,-perl-rs} v2 00/11] Status reporting for WireGuard fabrics Arthur Bied-Charreton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261117183500.750636-10-s.hanreich@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal