[pve-devel] [PATCH pve-common v1 21/23] sectionconfig: note that props added by plugins are always optional

Max R. Carrara m.carrara at proxmox.com
Fri Dec 19 20:44:56 CET 2025


... in the docstring for the `properties()` method. Also explain why
that is the case.

Signed-off-by: Max R. Carrara <m.carrara at proxmox.com>
---
 src/PVE/SectionConfig.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm
index a584e0c..5c83d6a 100644
--- a/src/PVE/SectionConfig.pm
+++ b/src/PVE/SectionConfig.pm
@@ -328,6 +328,11 @@ the plugin's schema and made C<optional> by default.
 
 See the C<L<< options()|/$plugin->options() >>> method for more information.
 
+B<NOTE:> All properties added by child plugins are always marked as C<< optional => 1 >>,
+even if explicitly declared as C<< optional => 0 >>. If that were not the case,
+any plugin could add a new required (non-optional) property and break existing
+plugins.
+
 =cut
 
 sub properties {
-- 
2.47.3





More information about the pve-devel mailing list