all lists on 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 v2 2/2] network-interface-pinning: allow arbitrary names
Date: Tue, 29 Jul 2025 19:16:45 +0200	[thread overview]
Message-ID: <20250729171649.708219-4-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250729171649.708219-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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/CLI/proxmox_network_interface_pinning.pm b/PVE/CLI/proxmox_network_interface_pinning.pm
index 9bbc2929d..adc0acd52 100644
--- a/PVE/CLI/proxmox_network_interface_pinning.pm
+++ b/PVE/CLI/proxmox_network_interface_pinning.pm
@@ -370,14 +370,14 @@ __PACKAGE__->register_method({
                 description =>
                     'Use a specific prefix for automatically choosing the pinned name.',
                 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,
                 requires => 'interface',
             },
-- 
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-07-29 17:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29 17:16 [pve-devel] [PATCH common/manager v2 0/3] arbitrary prefixes for pinning network interfaces Stefan Hanreich
2025-07-29 17:16 ` [pve-devel] [PATCH pve-common v2 1/1] inotify/interfaces: use ip link for detecting physical interfaces Stefan Hanreich
2025-07-29 19:21   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-29 17:16 ` [pve-devel] [PATCH pve-manager v2 1/2] pvestatd: pull metric: use ip link to detect " Stefan Hanreich
2025-07-29 19:21   ` [pve-devel] applied: " Thomas Lamprecht
2025-07-29 17:16 ` Stefan Hanreich [this message]
2025-07-29 19:21   ` [pve-devel] applied: [PATCH pve-manager v2 2/2] network-interface-pinning: allow arbitrary names Thomas Lamprecht

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=20250729171649.708219-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 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