public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager 2/2] network-interface-pinning: allow arbitrary names
Date: Thu, 24 Jul 2025 16:49:59 +0200	[thread overview]
Message-ID: <20250724144959.374061-4-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250724144959.374061-1-s.hanreich@proxmox.com>

With the changes to physical interface detection in pve-common and
pve-manager, it is now possible to use arbitrary names for physical
interfaces in our network stack. This allows the removal of the
existing, hardcoded, prefixes.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 PVE/CLI/proxmox_network_interface_pinning.pm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/PVE/CLI/proxmox_network_interface_pinning.pm b/PVE/CLI/proxmox_network_interface_pinning.pm
index e2ad8c69f..d09b380f4 100644
--- a/PVE/CLI/proxmox_network_interface_pinning.pm
+++ b/PVE/CLI/proxmox_network_interface_pinning.pm
@@ -367,16 +367,17 @@ __PACKAGE__->register_method({
                 optional => 1,
             },
             prefix => {
-                description => 'Only pin a specific interface.',
+                description => 'Prefix for auto-generating network interface names. '
+                    . 'Generated names will use that prefix + the index appended ("prefixN")',
                 type => 'string',
-                enum => ['nic', 'if'],
+                pattern => '^[a-zA-Z][a-zA-Z0-9-_]{0,7}$',
                 default => 'nic', # just for the docs.
                 optional => 1,
             },
             'target-name' => {
                 description => 'Pin the interface to a specific name',
                 type => 'string',
-                pattern => '(?:nic|if)\d+',
+                format => 'pve-iface',
                 optional => 1,
             },
         },
-- 
2.39.5


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


  parent reply	other threads:[~2025-07-24 14:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24 14:49 [pve-devel] [RFC common/manager 0/3] arbitrary prefixes for pinning network interfaces Stefan Hanreich
2025-07-24 14:49 ` [pve-devel] [PATCH pve-common 1/1] inotify/interfaces: use ip link for detecting physical interfaces Stefan Hanreich
2025-07-24 14:49 ` [pve-devel] [PATCH pve-manager 1/2] pvestatd: pull metric: use ip link to detect " Stefan Hanreich
2025-07-24 14:49 ` Stefan Hanreich [this message]
2025-07-29 17:17 ` [pve-devel] superseded: [RFC common/manager 0/3] arbitrary prefixes for pinning network interfaces Stefan Hanreich

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=20250724144959.374061-4-s.hanreich@proxmox.com \
    --to=s.hanreich@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 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