]> git.proxmox.com Git - pve-ha-manager.git/blobdiff - src/PVE/HA/Groups.pm
use correct verify function for ha-group-node-list
[pve-ha-manager.git] / src / PVE / HA / Groups.pm
index 0f0ddf9c7931aae26fa7b110ce868fc578841f2b..92147648d8ef9fc642ac8ce40cb9cb0d9039150a 100644 (file)
@@ -12,10 +12,13 @@ use base qw(PVE::SectionConfig);
 
 my $defaultData = {
     propertyList => {
-       type => { description => "Section type." },
+       type => {
+           description => "Group type.",
+           optional => 1,
+       },
        group => get_standard_option('pve-ha-group-id',
                                    { completion => \&PVE::HA::Tools::complete_group }),
-       nodes => get_standard_option('pve-ha-group-node-list'),
+       nodes => get_standard_option('pve-ha-group-node-list', { optional => 1 }),
        restricted => {
            description => "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.",
            type => 'boolean', 
@@ -43,7 +46,7 @@ sub type {
 
 sub options {
     return {
-       nodes => {},
+       nodes => { optional => 0 },
        comment => { optional => 1 },
        nofailback => { optional => 1 },
        restricted => { optional => 1 },
@@ -61,7 +64,7 @@ sub decode_value {
        my $res = {};
 
        foreach my $node (PVE::Tools::split_list($value)) {
-           if (PVE::JSONSchema::pve_verify_node_name($node)) {
+           if (PVE::HA::Tools::pve_verify_ha_group_node($node)) {
                $res->{$node} = 1;
            }
        }