fix #5141: network parser: fix accidental RE result re-use $1 and friends are not cleared if a RE fails to match, in which case they will contain the captured values from a previous successful match in the same scope. deduplicate the two branches to avoid accidental re-introduction. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
network tests: switch to ifupdown2 adapt allow-* to auto, and drop the one test where behaviour is not testable anymore. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
section config: avoid unamed boolean parameter use hash Even with just one param it's extra work to check what it refers too, with named ones in a hash one hasn't that issue even with many params. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
section config: add tests for separated property lists more or less a copy from the normal section config test, but now with properties defined multiple times as well as conflicting options Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> [ TL: improve consistency with property-isolation terminology ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
section config: allow full property-isolation for plugins When using 'init(property_isolation => 1)', the code saves the property lists per type instead of a big one, and using create/updateSchema creates a new schema with the options as 'oneOf' and/or 'instance-types' (depending if the schemas match). With that, we change how we work with the options hash: It's not needed anymore to specify options that are specified in the type specific propertyList, except if it's 'fixed => 1' (since that does not exist in the schema) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> [ TL: ensure consistency with new property-isolation terminology ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
json schema: implement 'oneOf' schema a schema can now have the 'oneOf' property which is an array of regular schemas. In the default case any of that has to match. If the 'type-property'/'instance-types' are given, only the schema for the specific type will be checked (and handles as 'additionalProperties' if there is no matching type) the field found in 'type-property' has to be on the same level (so for oneOf the nested schemas should not include that). Documentation is adapted so that options are grouped per `type-property=value` after the regular options (with their individual descriptions/types/etc.) oneOfs without 'type-property'/'instance-tyeps' simply show up twice for now with an 'or' line in between. command line parsing is a bit weird for now since Getopt::Long can't have multiple variants for the same property (but works fine with pvesh for our current use cases). it gets shown as '--foo <multiple' if they are not optional. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
fix #4162: added `Auto-Submitted` header to email body `Auto-Submitted` is defined in the rfc 5436 [1] and describes how an automatic response (f.e. ooo replies, etc.) should behave on the emails. When using `Auto-Submitted: auto-generated` (or any value other than `none`) automatic replies won't be triggered. [1]: https://www.rfc-editor.org/rfc/rfc3834.html Signed-off-by: Gabriel Goller <g.goller@proxmox.com>