public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-ve-rs v4 1/1] host: network: move to proxmox-network-api
Date: Thu, 31 Jul 2025 16:08:44 +0200	[thread overview]
Message-ID: <20250731140855.573717-2-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250731140855.573717-1-s.hanreich@proxmox.com>

The structs have been moved to the proxmox-network-api, so they can be
reused across all projects. Initially it has been added here for
convenience, since the only user was proxmox-firewall - which is not
the case anymore.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 proxmox-ve-config/src/host/mod.rs     |  1 -
 proxmox-ve-config/src/host/network.rs | 35 ---------------------------
 2 files changed, 36 deletions(-)
 delete mode 100644 proxmox-ve-config/src/host/network.rs

diff --git a/proxmox-ve-config/src/host/mod.rs b/proxmox-ve-config/src/host/mod.rs
index a9da919..b4ab6a6 100644
--- a/proxmox-ve-config/src/host/mod.rs
+++ b/proxmox-ve-config/src/host/mod.rs
@@ -1,3 +1,2 @@
-pub mod network;
 pub mod types;
 pub mod utils;
diff --git a/proxmox-ve-config/src/host/network.rs b/proxmox-ve-config/src/host/network.rs
deleted file mode 100644
index 09f4fb1..0000000
--- a/proxmox-ve-config/src/host/network.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-use std::collections::HashMap;
-
-#[derive(Debug, Clone, serde::Deserialize)]
-pub struct IpLink {
-    ifname: String,
-    #[serde(default)]
-    altnames: Vec<String>,
-}
-
-#[derive(Debug, Clone, serde::Deserialize)]
-pub struct InterfaceMapping {
-    mapping: HashMap<String, String>,
-}
-
-impl std::ops::Deref for InterfaceMapping {
-    type Target = HashMap<String, String>;
-
-    fn deref(&self) -> &Self::Target {
-        &self.mapping
-    }
-}
-
-impl FromIterator<IpLink> for InterfaceMapping {
-    fn from_iter<T: IntoIterator<Item = IpLink>>(iter: T) -> Self {
-        let mut mapping = HashMap::new();
-
-        for iface in iter.into_iter() {
-            for altname in iface.altnames {
-                mapping.insert(altname, iface.ifname.clone());
-            }
-        }
-
-        Self { mapping }
-    }
-}
-- 
2.47.2


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


  reply	other threads:[~2025-07-31 14:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31 14:08 [pbs-devel] [PATCH proxmox{-ve-rs, , -backup, -firewall, -network-interface-pinning} v4 00/10] proxmox-network-interface-pinning Stefan Hanreich
2025-07-31 14:08 ` Stefan Hanreich [this message]
2025-07-31 14:08 ` [pbs-devel] [PATCH proxmox v4 1/3] pbs-api-types: use proxmox-network-api types Stefan Hanreich
2025-07-31 14:08 ` [pbs-devel] [PATCH proxmox v4 2/3] proxmox-network-api: use ip link for querying interface information Stefan Hanreich
2025-07-31 14:08 ` [pbs-devel] [PATCH proxmox v4 3/3] network-api: add rename_interfaces method Stefan Hanreich
2025-08-04 12:55   ` Wolfgang Bumiller
2025-08-04 14:24     ` Stefan Hanreich
2025-07-31 14:08 ` [pbs-devel] [PATCH proxmox-backup v4 1/4] config: network: move to proxmox-network-api Stefan Hanreich
2025-07-31 14:08 ` [pbs-devel] [PATCH proxmox-backup v4 2/4] metric_collection: use ip link for determining the type of interfaces Stefan Hanreich
2025-07-31 14:08 ` [pbs-devel] [PATCH proxmox-backup v4 3/4] docs: add documentation for proxmox-network-interface-pinning Stefan Hanreich
2025-07-31 14:08 ` [pbs-devel] [PATCH proxmox-backup v4 4/4] ui: show altnames Stefan Hanreich
2025-07-31 14:08 ` [pbs-devel] [PATCH proxmox-firewall v4 1/1] firewall: config: use proxmox-network-api Stefan Hanreich
2025-07-31 14:08 ` [pbs-devel] [PATCH proxmox-network-interface-pinning v4 1/1] initial commit Stefan Hanreich
2025-08-04 13:48   ` Wolfgang Bumiller
2025-08-04 14:46     ` Stefan Hanreich
2025-08-01  9:51 ` [pbs-devel] [PATCH proxmox{-ve-rs, , -backup, -firewall, -network-interface-pinning} v4 00/10] proxmox-network-interface-pinning Christian Ebner
2025-08-01 10:26   ` Christian Ebner

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=20250731140855.573717-2-s.hanreich@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=pbs-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