]> git.proxmox.com Git - pve-network.git/commitdiff
sdn: simple: Improve dhcp property description and validation
authorStefan Hanreich <s.hanreich@proxmox.com>
Tue, 21 Nov 2023 13:31:04 +0000 (14:31 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 21 Nov 2023 13:35:06 +0000 (14:35 +0100)
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
src/PVE/Network/SDN/Zones/SimplePlugin.pm

index f4525d5ac9df2ddc10dd10004d496602527380ac..7cb65c28558152fcca1a49a44e1bf6438cf6259e 100644 (file)
@@ -3,6 +3,7 @@ package PVE::Network::SDN::Zones::SimplePlugin;
 use strict;
 use warnings;
 use PVE::Network::SDN::Zones::Plugin;
+use PVE::Network::SDN::Dhcp::Plugin;
 use PVE::Exception qw(raise raise_param_exc);
 use PVE::Cluster;
 use PVE::Tools;
@@ -28,8 +29,9 @@ sub properties {
            description => "dns domain zone  ex: mydomain.com",
        },
        dhcp => {
-           type => 'pve-configid',
-           description => 'ID of the DHCP server responsible for managing this range',
+           description => 'Type of the DHCP backend for this zone',
+           type => 'string',
+           enum => PVE::Network::SDN::Dhcp::Plugin->lookup_types(),
            requires => 'ipam',
        },
     };