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 v2 widget-toolkit 3/6] network: allow bridges to have any valid interface name
Date: Fri, 23 Feb 2024 15:36:48 +0100	[thread overview]
Message-ID: <20240223143651.418065-4-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20240223143651.418065-1-s.hanreich@proxmox.com>

Allow the web UI to accept bridge interfaces with any valid interface
name, rather than being limited to the arbitrary "vmbr" prefix.

Originally-by: Jillian Morgan <jillian.morgan@primordial.ca>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 src/Toolkit.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Toolkit.js b/src/Toolkit.js
index 6fd73f5..b8fbd91 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -76,7 +76,7 @@ Ext.apply(Ext.form.field.VTypes, {
     MacPrefixText: gettext('Example') + ': 02:8f - ' + gettext('only unicast addresses are allowed'),
 
     BridgeName: function(v) {
-	return (/^vmbr\d{1,4}$/).test(v);
+	return (/^[a-zA-Z][a-zA-Z0-9_]{0,14}$/).test(v);
     },
     VlanName: function(v) {
        if (Proxmox.Utils.VlanInterface_match.test(v)) {
@@ -86,7 +86,7 @@ Ext.apply(Ext.form.field.VTypes, {
        }
        return true;
     },
-    BridgeNameText: gettext('Format') + ': vmbr<b>N</b>, where 0 <= <b>N</b> <= 9999',
+    BridgeNameText: gettext('Format') + ': alphanumeric string starting with a character',
 
     BondName: function(v) {
 	return (/^bond\d{1,4}$/).test(v);
-- 
2.39.2




  parent reply	other threads:[~2024-02-23 14:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 14:36 [pve-devel] [PATCH v2 common/docs/widget-toolkit/manager/firewall 0/6] drop vmbr prefix for bridges Stefan Hanreich
2024-02-23 14:36 ` [pve-devel] [PATCH v2 common 1/6] interfaces: allow arbitrary bridge names in network config Stefan Hanreich
2024-02-23 14:36 ` [pve-devel] [PATCH v2 docs 2/6] network: update specification for bridge names Stefan Hanreich
2024-02-23 14:36 ` Stefan Hanreich [this message]
2024-02-23 14:36 ` [pve-devel] [PATCH v2 manager 4/6] sdn: qinq: vlan: properly validate bridge name Stefan Hanreich
2024-02-23 14:36 ` [pve-devel] [PATCH v2 manager 5/6] sdn: vlan: fix indentation in vlan edit dialogue Stefan Hanreich
2024-02-23 14:36 ` [pve-devel] [PATCH v2 firewall 6/6] simulator: use new bridge naming scheme Stefan Hanreich
     [not found]   ` <mailman.235.1708944723.434.pve-devel@lists.proxmox.com>
2024-02-26 15:36     ` Thomas Lamprecht
2024-02-27 12:35       ` Stefan Hanreich
2024-02-28  9:35         ` 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=20240223143651.418065-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