all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH proxmox-perl-rs v2 2/4] fabrics: add function to get status of fabric
Date: Tue, 26 Aug 2025 10:29:03 +0200	[thread overview]
Message-ID: <sglqxg2gx5k3vqldz4pwm3koic2tfjkuo7d5mck5z5kxh4qumu@2avkkvjnox7m> (raw)
In-Reply-To: <ccapkrllotf3szmbz6xqje4w562yoqvtfrbglbru55otbl53xa@5xufzfxufveu>

On 26.08.2025 09:55, Wolfgang Bumiller wrote:
>On Mon, Aug 25, 2025 at 05:33:49PM +0200, Gabriel Goller wrote:
>> On 25.08.2025 16:37, Wolfgang Bumiller wrote:
>> > On Mon, Aug 25, 2025 at 01:39:48PM +0200, Gabriel Goller wrote:
>> > > On 25.08.2025 10:11, Wolfgang Bumiller wrote:
>> > > > > diff --git a/pve-rs/src/bindings/sdn/fabrics.rs b/pve-rs/src/bindings/sdn/fabrics.rs
>> > > > > index 1dc8bf4320e6..3f70d421e582 100644
>> > > > > --- a/pve-rs/src/bindings/sdn/fabrics.rs
>> > > > > +++ b/pve-rs/src/bindings/sdn/fabrics.rs
>> > > > > @@ -9,8 +9,10 @@ pub mod pve_rs_sdn_fabrics {
>> > > > >      use std::fmt::Write;
>> > > > >      use std::net::IpAddr;
>> > > > >      use std::ops::Deref;
>> > > > > +    use std::process::Command;
>> > > > >      use std::sync::Mutex;
>> > > > >
>> > > > > +    use anyhow::Context;
>> > > > >      use anyhow::Error;
>> > > > >      use openssl::hash::{MessageDigest, hash};
>> > > > >      use serde::{Deserialize, Serialize};
>> > > > > @@ -578,4 +580,196 @@ pub mod pve_rs_sdn_fabrics {
>> > > > >
>> > > > >          Ok(interfaces)
>> > > > >      }
>> > > > > +
>> > > > > +    /// This module contains status-related structs that represent Routes and Neighbors for all
>> > > > > +    /// protocols
>> > > > > +    pub mod status {
>> > > >
>> > > > ^ This seems to be a helper module which does not contain any
>> > > > perlmod/perl specifics.
>> > > > I'd argue it's time to start a `crate::sdn` module outside of the
>> > > > `bindings` submodule for this.
>> > > >
>> > > > The `bindings` module should become rather more lean in the future and
>> > > > focus mostly on the perl/rust interaction.
>> > >
>> > > Umm do I understand you correctly that you want to have something like
>> > > this:
>> > >
>> > >     src/
>> > >     ├─ bindings/
>> > >     │  ├─ sdn/
>> > >     │  │  ├─ fabrics.rs
>> > >     ├─ sdn/
>> > >     │  ├─ status.rs
>> > >
>> > > ?
>> >
>> > Yes. The bindings should just be the perl interface and its point is to
>> > provide documentation via rustdoc, and the rustdocs should tell you how
>> > to use it *from perl*.
>> >
>> > The rest would be additional code we need to provide the perl interface
>> > for the external crates.
>> >
>> > > IMO we could move all the status stuff out to
>> > > crate::bindings::sdn::status. But I don't know about separating all the
>> > > types, conversion methods and actual perl methods -- I'd rather keep all
>> > > the perl-facing stuff in the same file.
>> >
>> > You don't need to separate everything. My point was that it does *not*
>> > contain perl *binding* specifics. As for being *perl* specific, I mean,
>> > the entire `pve-rs` crate *is* perl specific right now...
>>
>> True :)
>> Should we maybe have a 'types' module in the middle, so that we have:
>>
>> src/bindings/sdn/fabrics.rs
>> src/types/sdn/fabrics.rs
>
>Not really a fan of this. I'd rather have the toplevel modules by
>feature.

ACK

>This *may* make sense if/when we start putting API types there and
>serialize the schema out into perl, which is something we should
>take into serious consideration soon-ish. It may be the complement or
>even improve the situation with the pve-api-types crate. (While *at
>first* it will definitely be a nuisance with where to find type
>definitions and getting them updated... but in the long run? Anyway...
>this is out of scope here :) )

Agree.


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

  reply	other threads:[~2025-08-26  8:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22  9:00 [pve-devel] [PATCH manager/network/proxmox{-ve-rs, -perl-rs} v2 00/12] Add fabric status view Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH proxmox-ve-rs v2 1/2] frr: make room for deserialization structs Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH proxmox-ve-rs v2 2/2] frr: add deserialization types for openfabric and ospf Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH proxmox-perl-rs v2 1/4] pve: fabrics: update proxmox-frr import path Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH proxmox-perl-rs v2 2/4] fabrics: add function to get status of fabric Gabriel Goller
2025-08-25  8:11   ` Wolfgang Bumiller
2025-08-25  8:25     ` Wolfgang Bumiller
2025-08-25 11:39     ` Gabriel Goller
2025-08-25 14:37       ` Wolfgang Bumiller
2025-08-25 15:33         ` Gabriel Goller
2025-08-26  7:55           ` Wolfgang Bumiller
2025-08-26  8:29             ` Gabriel Goller [this message]
2025-08-22  9:00 ` [pve-devel] [PATCH proxmox-perl-rs v2 3/4] fabrics: add function to get all routes distributed by the fabrics Gabriel Goller
2025-08-25  8:22   ` Wolfgang Bumiller
2025-08-25 11:40     ` Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH proxmox-perl-rs v2 4/4] fabrics: add function to get all neighbors of the fabric Gabriel Goller
2025-08-25  8:28   ` Wolfgang Bumiller
2025-08-25 11:41     ` Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH pve-network v2 1/3] fabrics: add fabrics status to SDN::status function Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH pve-network v2 2/3] fabrics: add api endpoint to return fabrics routes Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH pve-network v2 3/3] fabrics: add api endpoint to return fabric neighbors Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH pve-manager v2 1/3] pvestatd: add fabrics status to pvestatd Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH pve-manager v2 2/3] fabrics: add resource view for fabrics Gabriel Goller
2025-08-22  9:00 ` [pve-devel] [PATCH pve-manager v2 3/3] permissions: differentiate between zone and fabric paths Gabriel Goller
2025-08-26  9:52 ` [pve-devel] [PATCH manager/network/proxmox{-ve-rs, -perl-rs} v2 00/12] 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=sglqxg2gx5k3vqldz4pwm3koic2tfjkuo7d5mck5z5kxh4qumu@2avkkvjnox7m \
    --to=g.goller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=w.bumiller@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