]> git.proxmox.com Git - pve-network.git/blobdiff - PVE/Network/SDN/Controllers/Plugin.pm
controllers: allow minus and underscore in IDs again
[pve-network.git] / PVE / Network / SDN / Controllers / Plugin.pm
index 639cacafe2278276e243686c3410fa1bb8f28bcb..c1c2cfd2e0a7d3dfc734536cef0817a98309f1a5 100644 (file)
@@ -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";
     }