]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/SectionConfig.pm
add missing build dependencies
[pve-common.git] / src / PVE / SectionConfig.pm
index bfe4f8b958aeeedd3d7ba3c0f90904846c8ae55d..b1e96a4ed42bd9625e0a53b1ec932d061ea1f053 100644 (file)
@@ -51,7 +51,7 @@ sub plugindata {
 }   
 
 sub createSchema {
-    my ($class) = @_;
+    my ($class, $skip_type) = @_;
 
     my $pdata = $class->private();
     my $propertyList = $pdata->{propertyList};
@@ -71,6 +71,8 @@ sub createSchema {
     };
 
     foreach my $p (keys %$propertyList) {
+       next if $skip_type && $p eq 'type';
+
        if (!$propertyList->{$p}->{optional}) {
            $props->{$p} = $propertyList->{$p};
            next;
@@ -257,6 +259,10 @@ sub check_value {
        }
     }
 
+    if ($ct eq 'boolean' || $ct eq 'integer' || $ct eq 'number') {
+       return $value + 0; # convert to number
+    }
+
     return $value;
 }