From 741bf653ae209c95701544857455ffb9df93d3ed Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Thu, 10 Aug 2023 14:37:06 +0200 Subject: [PATCH] section config: allow base properties for {create, update}Schema() This works the same way as e.g. get_standard_option does it. Signed-off-by: Christoph Heiss --- src/PVE/SectionConfig.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm index 97492db..2b75e6a 100644 --- a/src/PVE/SectionConfig.pm +++ b/src/PVE/SectionConfig.pm @@ -52,13 +52,13 @@ sub plugindata { } sub createSchema { - my ($class, $skip_type) = @_; + my ($class, $skip_type, $base) = @_; my $pdata = $class->private(); my $propertyList = $pdata->{propertyList}; my $plugins = $pdata->{plugins}; - my $props = {}; + my $props = $base || {}; my $copy_property = sub { my ($src) = @_; @@ -107,13 +107,13 @@ sub createSchema { } sub updateSchema { - my ($class, $single_class) = @_; + my ($class, $single_class, $base) = @_; my $pdata = $class->private(); my $propertyList = $pdata->{propertyList}; my $plugins = $pdata->{plugins}; - my $props = {}; + my $props = $base || {}; my $filter_type = $single_class ? $class->type() : undef;