all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network 1/3] fabrics: add fabrics status to SDN::status function
Date: Wed, 13 Aug 2025 15:30:10 +0200	[thread overview]
Message-ID: <20250813133023.288351-5-g.goller@proxmox.com> (raw)
In-Reply-To: <20250813133023.288351-1-g.goller@proxmox.com>

Add the fabrics to the global SDN::status function. This is needed in
pve-manager to insert the status into the pvestatd resources.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 src/PVE/API2/Network/SDN/Zones/Content.pm | 2 +-
 src/PVE/API2/Network/SDN/Zones/Status.pm  | 2 +-
 src/PVE/Network/SDN.pm                    | 6 ++++--
 src/test/debug/statuscheck.pl             | 3 ++-
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/PVE/API2/Network/SDN/Zones/Content.pm b/src/PVE/API2/Network/SDN/Zones/Content.pm
index 76663210067d..2427abe70c93 100644
--- a/src/PVE/API2/Network/SDN/Zones/Content.pm
+++ b/src/PVE/API2/Network/SDN/Zones/Content.pm
@@ -70,7 +70,7 @@ __PACKAGE__->register_method({
 
         my $res = [];
 
-        my ($zone_status, $vnet_status) = PVE::Network::SDN::status();
+        my ($zone_status, $vnet_status, $fabric_status) = PVE::Network::SDN::status();
 
         foreach my $id (keys %{$vnet_status}) {
             if ($vnet_status->{$id}->{zone} eq $zoneid) {
diff --git a/src/PVE/API2/Network/SDN/Zones/Status.pm b/src/PVE/API2/Network/SDN/Zones/Status.pm
index 495756795f47..f9e79ffcef7a 100644
--- a/src/PVE/API2/Network/SDN/Zones/Status.pm
+++ b/src/PVE/API2/Network/SDN/Zones/Status.pm
@@ -63,7 +63,7 @@ __PACKAGE__->register_method({
 
         my $res = [];
 
-        my ($zone_status, $vnet_status) = PVE::Network::SDN::status();
+        my ($zone_status, $vnet_status, $fabric_status) = PVE::Network::SDN::status();
 
         foreach my $id (sort keys %{$zone_status}) {
             my $item->{zone} = $id;
diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm
index 83f2cc71845e..19efde8b6b95 100644
--- a/src/PVE/Network/SDN.pm
+++ b/src/PVE/Network/SDN.pm
@@ -16,6 +16,8 @@ use PVE::RESTEnvironment qw(log_warn);
 use PVE::RPCEnvironment;
 use PVE::Tools qw(file_get_contents file_set_contents extract_param dir_glob_regex run_command);
 
+use PVE::RS::SDN::Fabrics;
+
 use PVE::Network::SDN::Vnets;
 use PVE::Network::SDN::Zones;
 use PVE::Network::SDN::Controllers;
@@ -87,9 +89,9 @@ sub ifquery_check {
 }
 
 sub status {
-
     my ($zone_status, $vnet_status) = PVE::Network::SDN::Zones::status();
-    return ($zone_status, $vnet_status);
+    my $fabric_status = PVE::RS::SDN::Fabrics::status();
+    return ($zone_status, $vnet_status, $fabric_status);
 }
 
 sub running_config {
diff --git a/src/test/debug/statuscheck.pl b/src/test/debug/statuscheck.pl
index e43003ba8774..e963117659d8 100644
--- a/src/test/debug/statuscheck.pl
+++ b/src/test/debug/statuscheck.pl
@@ -3,7 +3,8 @@ use warnings;
 use PVE::Network::SDN;
 use Data::Dumper;
 
-my ($transport_status, $vnet_status) = PVE::Network::SDN::status();
+my ($transport_status, $vnet_status, $fabric_status) = PVE::Network::SDN::status();
 
+print Dumper($fabric_status);
 print Dumper($vnet_status);
 print Dumper($transport_status);
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  parent reply	other threads:[~2025-08-13 13:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 13:30 [pve-devel] [PATCH manager/network/proxmox-perl-rs 0/8] Add fabric status view Gabriel Goller
2025-08-13 13:30 ` [pve-devel] [PATCH proxmox-perl-rs 1/3] fabrics: add function to get status of fabric Gabriel Goller
2025-08-13 13:30 ` [pve-devel] [PATCH proxmox-perl-rs 2/3] fabrics: add function to get all routes distributed by the fabrics Gabriel Goller
2025-08-13 13:30 ` [pve-devel] [PATCH proxmox-perl-rs 3/3] fabrics: add function to get all neighbors of the fabric Gabriel Goller
2025-08-13 13:30 ` Gabriel Goller [this message]
2025-08-13 13:30 ` [pve-devel] [PATCH pve-network 2/3] fabrics: add api endpoint to return fabrics routes Gabriel Goller
2025-08-13 13:30 ` [pve-devel] [PATCH pve-network 3/3] fabrics: add api endpoint to return fabric neighbors Gabriel Goller
2025-08-13 13:30 ` [pve-devel] [PATCH pve-manager 1/2] pvestatd: add fabrics status to pvestatd Gabriel Goller
2025-08-13 13:30 ` [pve-devel] [PATCH pve-manager 2/2] fabrics: add resource view for fabrics Gabriel Goller
2025-08-22  9:01 ` [pve-devel] [PATCH manager/network/proxmox-perl-rs 0/8] Add fabric status view Gabriel Goller

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=20250813133023.288351-5-g.goller@proxmox.com \
    --to=g.goller@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal