This works the same way as e.g. get_standard_option does it.

Signed-off-by: Christoph Heiss <[email protected]>
---
Changes v2 -> v3:
  * New patch; as suggested by Wolfgang

 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;

--
2.41.0



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to