From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH common v3 2/4] section config: allow base properties for {create, update}Schema()
Date: Thu, 10 Aug 2023 14:37:06 +0200 [thread overview]
Message-ID: <20230810123710.949260-3-c.heiss@proxmox.com> (raw)
In-Reply-To: <20230810123710.949260-1-c.heiss@proxmox.com>
This works the same way as e.g. get_standard_option does it.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
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
next prev parent reply other threads:[~2023-08-10 12:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 12:37 [pve-devel] [PATCH common/access-control/manager v3 0/4] ldap: check bind connection on realm add/update Christoph Heiss
2023-08-10 12:37 ` [pve-devel] [PATCH common v3 1/4] ldap: handle errors explicitly everywhere instead of simply `die`ing Christoph Heiss
2023-08-10 12:37 ` Christoph Heiss [this message]
2023-08-10 12:37 ` [pve-devel] [PATCH access-control v3 3/4] ldap: add opt-in `check-connection` param to perform a bind check Christoph Heiss
2023-08-10 12:37 ` [pve-devel] [PATCH manager v3 4/4] ui: ldap: add 'Check connection' checkbox as advanced option Christoph Heiss
2023-08-11 11:39 ` [pve-devel] applied-series: [PATCH common/access-control/manager v3 0/4] ldap: check bind connection on realm add/update Wolfgang Bumiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230810123710.949260-3-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.