X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=src%2FPVE%2FSectionConfig.pm;h=b46b59ed259fae053b0880e3f1a7deb3acab9ca0;hb=HEAD;hp=fb1192b8182d8cc1428299c34cb170c8bc3c1863;hpb=7887b1cb0eed99711c582c96d8d58608cfdbf030;p=pve-common.git diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm index fb1192b..a18e9d8 100644 --- a/src/PVE/SectionConfig.pm +++ b/src/PVE/SectionConfig.pm @@ -61,7 +61,7 @@ use PVE::Tools; # calling init with `1` as its parameter like this: # # ``` -# PVE::Dummy::BasePlugin->init(1); +# PVE::Dummy::BasePlugin->init(property_isolation => 1); # ``` # # With this, each plugin get's their own isolated list of properties which it @@ -326,8 +326,16 @@ sub updateSchema { }; } +# the %param hash controls some behavior of the section config, currently the following options are +# understood: +# +# - property_isolation: if set, each child-plugin has a fully isolated property (schema) namespace. +# By default this is off, meaning all child-plugins share the schema of properties with the same +# name. Normally one wants to use oneOf schema's when enabling isolation. sub init { - my ($class, $property_isolation) = @_; + my ($class, %param) = @_; + + my $property_isolation = $param{property_isolation}; my $pdata = $class->private();