From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox-ve-rs v3 04/13] ve-config: add IS-IS status deserialization types
Date: Fri, 28 Aug 2026 13:32:43 +0200 [thread overview]
Message-ID: <20260828113255.176546-5-g.goller@proxmox.com> (raw)
In-Reply-To: <20260828113255.176546-1-g.goller@proxmox.com>
Add types to deserialize the FRR json output when getting the status of
a fabric.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
proxmox-frr/src/de/isis.rs | 103 +++++++++++++++++++++++++++++++++++++
proxmox-frr/src/de/mod.rs | 1 +
2 files changed, 104 insertions(+)
create mode 100644 proxmox-frr/src/de/isis.rs
diff --git a/proxmox-frr/src/de/isis.rs b/proxmox-frr/src/de/isis.rs
new file mode 100644
index 000000000000..46c4357125a8
--- /dev/null
+++ b/proxmox-frr/src/de/isis.rs
@@ -0,0 +1,103 @@
+use serde::{Deserialize, Serialize};
+
+/// State of the adjacency of a Isis neighbor
+#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
+pub enum AdjacencyState {
+ Initializing,
+ Up,
+ Down,
+ #[serde(other)]
+ Unknown,
+}
+
+/// Neighbor Interface
+///
+/// Interface used to communicate with a specific neighbor
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+pub struct NeighborInterface {
+ /// The name of the interface
+ pub name: String,
+ /// The state of the adjacency, this is "Up" when everything is well
+ pub state: Option<AdjacencyState>,
+ /// Time since the last adj-flap (basically the uptime)
+ #[serde(rename = "last-ago")]
+ pub last_ago: String,
+}
+
+/// Adjacency information
+///
+/// Circuits are Layer-2 Broadcast domains (Either point-to-point or LAN).
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+pub struct Circuit {
+ /// The hostname of the adjacency peer
+ pub adj: Option<String>,
+ /// The interface of the neighbor
+ pub interface: Option<NeighborInterface>,
+}
+
+/// An isis area the same as SDN fabric.
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+pub struct Area {
+ /// The are name, this is the same as the fabric_id, so the name of the fabric.
+ pub area: String,
+ /// Circuits are Layer-2 Broadcast domains (Either point-to-point or LAN).
+ pub circuits: Vec<Circuit>,
+}
+
+/// The parsed neighbors.
+///
+/// This models the output of:
+/// `vtysh -c 'show isis neighbor json'`.
+#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)]
+pub struct Neighbors {
+ /// Every sdn fabric is also an isis 'area'
+ pub areas: Vec<Area>,
+}
+
+/// The NetworkType of a isis interface
+#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
+pub enum NetworkType {
+ #[serde(rename(deserialize = "p2p", serialize = "Point-To-Point"))]
+ PointToPoint,
+ #[serde(rename(deserialize = "lan", serialize = "Broadcast"))]
+ Lan,
+ #[serde(rename(deserialize = "loopback", serialize = "Loopback"))]
+ Loopback,
+ #[serde(rename = "Unknown", other)]
+ Unknown,
+}
+
+/// The State of a isis interface
+#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
+pub enum CircuitState {
+ Init,
+ Config,
+ Up,
+ #[serde(other)]
+ Unknown,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+#[serde(rename_all = "kebab-case")]
+pub struct Interface {
+ pub name: String,
+ pub state: CircuitState,
+ #[serde(rename = "type")]
+ pub ty: NetworkType,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
+pub struct InterfaceCircuits {
+ pub interface: Interface,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)]
+pub struct InterfaceArea {
+ pub area: String,
+ pub circuits: Vec<InterfaceCircuits>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)]
+pub struct Interfaces {
+ pub areas: Vec<InterfaceArea>,
+}
diff --git a/proxmox-frr/src/de/mod.rs b/proxmox-frr/src/de/mod.rs
index 3f2bd68d9cec..d5ba35b3c7a6 100644
--- a/proxmox-frr/src/de/mod.rs
+++ b/proxmox-frr/src/de/mod.rs
@@ -4,6 +4,7 @@ use proxmox_network_types::ip_address::Cidr;
use serde::{Deserialize, Serialize};
pub mod evpn;
+pub mod isis;
pub mod openfabric;
pub mod ospf;
--
2.47.3
next prev parent reply other threads:[~2026-08-28 11:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 11:32 [PATCH docs/gui-tests/manager/network/proxmox{-ve-rs,-perl-rs} v3 00/13] Add IS-IS protocol to fabrics Gabriel Goller
2026-08-28 11:32 ` [PATCH proxmox-ve-rs v3 01/13] frr: add fabric properties to ISIS types and rename domain Gabriel Goller
2026-08-28 11:32 ` [PATCH proxmox-ve-rs v3 02/13] ve-config: add IS-IS fabric config parsing and frr config generation Gabriel Goller
2026-08-28 11:32 ` [PATCH proxmox-ve-rs v3 03/13] ve-config: add integration tests for IS-IS fabrics Gabriel Goller
2026-08-28 11:32 ` Gabriel Goller [this message]
2026-08-28 11:32 ` [PATCH proxmox-ve-rs v3 05/13] frr: accept legacy ISIS domain field Gabriel Goller
2026-08-28 11:32 ` [PATCH proxmox-perl-rs v3 06/13] pve-rs: fabrics: add IS-IS protocol ifupdown config generation Gabriel Goller
2026-08-28 11:32 ` [PATCH proxmox-perl-rs v3 07/13] sdn: add IS-IS fabric status reporting Gabriel Goller
2026-08-28 11:32 ` [PATCH pve-network v3 08/13] fabrics: add IS-IS api types Gabriel Goller
2026-08-28 11:32 ` [PATCH pve-network v3 09/13] sdn: controllers: rename isis domain to fabric_id Gabriel Goller
2026-08-28 11:32 ` [PATCH pve-manager v3 10/13] fabrics: add IS-IS panels Gabriel Goller
2026-08-28 11:32 ` [PATCH pve-manager v3 11/13] sdn: add warning about IS-IS controller deprecation Gabriel Goller
2026-08-28 11:32 ` [PATCH pve-docs v3 12/13] sdn: add section about IS-IS fabric Gabriel Goller
2026-08-28 11:32 ` [PATCH pve-gui-tests v3 13/13] fabrics: add screenshots for IS-IS fabric and nodes 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=20260828113255.176546-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.