]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/SectionConfig.pm
createSchema: include type property
[pve-common.git] / src / PVE / SectionConfig.pm
index f6646f3398a1ec69e9e6c3ae1a71025641d4fbc4..71d296e6574f7a11d47a67083a45c5188c1b4887 100644 (file)
@@ -68,7 +68,6 @@ sub createSchema {
     };
 
     foreach my $p (keys %$propertyList) {
-       next if $p eq 'type';
        if (!$propertyList->{$p}->{optional}) {
            $props->{$p} = $propertyList->{$p};
            next;
@@ -119,6 +118,9 @@ sub updateSchema {
 
        my $modifyable = 0;
 
+       my $copts = $class->options();
+       $modifyable = 1 if defined($copts->{$p}) && !$copts->{$p}->{fixed};
+
        foreach my $t (keys %$plugins) {
            my $opts = $pdata->{options}->{$t} || {};
            next if !defined($opts->{$p});