summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lamprecht <t.lamprecht@proxmox.com>2022-02-01 11:19:43 +0100
committerThomas Lamprecht <t.lamprecht@proxmox.com>2022-02-01 11:21:07 +0100
commitf81ad67fc983ff0a2b7abe89e93b5e54d9bdeaf3 (patch)
tree8f8629051fe478694d061d394b8d1cb73d484148
parent3f557f268d25fa58696461098e7bbbe5f2bd8ded (diff)
controllers: allow minus and underscore in IDs again
commit 7c5b0f6 not only reduced the possible length but also the accepted character set, revert the latter partially again and allow using minus and underscore for characters not being the start or end. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
-rw-r--r--PVE/Network/SDN/Controllers/Plugin.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/PVE/Network/SDN/Controllers/Plugin.pm b/PVE/Network/SDN/Controllers/Plugin.pm
index 639caca..c1c2cfd 100644
--- a/PVE/Network/SDN/Controllers/Plugin.pm
+++ b/PVE/Network/SDN/Controllers/Plugin.pm
@@ -25,7 +25,7 @@ PVE::JSONSchema::register_format('pve-sdn-controller-id', \&parse_sdn_controller
sub parse_sdn_controller_id {
my ($id, $noerr) = @_;
- if ($id !~ m/^[a-z][a-z0-9]*[a-z0-9]$/i) {
+ if ($id !~ m/^[a-z][a-z0-9_-]*[a-z0-9]$/i) {
return undef if $noerr;
die "controller ID '$id' contains illegal characters\n";
}