[pve-devel] [PATCH pve-network 6/9] api: nodes: fabrics: add endpoint for querying interface status

Hannes Laimer h.laimer at proxmox.com
Mon Nov 3 15:24:34 CET 2025


On 10/30/25 16:59, Stefan Hanreich wrote:
> This endpoint returns the state of interfaces that are part of the
> fabric. For more information on the returned values, consult the
> proxmox-perl-rs commit. It is used by the NetworkBrowser panel.
> 
> Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
> ---
>   src/PVE/API2/Network/SDN/Nodes/Fabric.pm | 47 ++++++++++++++++++++++++
>   1 file changed, 47 insertions(+)
> 
> diff --git a/src/PVE/API2/Network/SDN/Nodes/Fabric.pm b/src/PVE/API2/Network/SDN/Nodes/Fabric.pm
> index b5971c7..90ea5e4 100644
> --- a/src/PVE/API2/Network/SDN/Nodes/Fabric.pm
> +++ b/src/PVE/API2/Network/SDN/Nodes/Fabric.pm
> @@ -138,3 +138,50 @@ __PACKAGE__->register_method({
>       },
>   });
>   
> +__PACKAGE__->register_method({
> +    name => 'interfaces',
> +    path => 'interfaces',
> +    method => 'GET',
> +    description => "Get neighbors of all fabrics.",

description looks familiar :P

> +    protected => 1,
> +    permissions => {
> +        check => ['perm', '/sdn/fabrics/{fabric}', ['SDN.Audit']],
> +    },
> +    proxyto => 'node',
> +    parameters => {
> +        additionalProperties => 0,
> +        properties => {
> +            node => get_standard_option('pve-node'),
> +            fabric => get_standard_option('pve-sdn-fabric-id'),
> +        },
> +    },
> +    returns => {
> +        type => 'array',
> +        items => {
> +            type => "object",
> +            properties => {
> +                name => {
> +                    description => "The name of the network interface.",
> +                    type => 'string',
> +                },
> +                type => {
> +                    description =>
> +                        "The type of this interface in the fabric (e.g. Point-to-Point, Broadcast, ..).",
> +                    type => 'string',
> +                },
> +                state => {
> +                    description => "The current state of the interface.",
> +                    type => 'string',
> +                },
> +            },
> +        },
> +    },
> +    code => sub {
> +        my ($param) = @_;
> +
> +        my $fabric_id = extract_param($param, 'fabric');
> +        return PVE::RS::SDN::Fabrics::interfaces($fabric_id);
> +    },
> +});
> +
> +1;





More information about the pve-devel mailing list