mirror of
https://git.proxmox.com/git/pve-common
synced 2025-04-28 15:57:11 +00:00
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 <c.heiss@proxmox.com>
This commit is contained in:
parent
10de5bfc2a
commit
741bf653ae
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user