Introduce slapconfiguration:jsonschema recipe
-
Enable
<= slap-connection
inslapconfiguration
usage
This is for convenience, to allow[slap-configuration] <= slap-connection recipe = slapos.cookbook:slapconfiguration
-
Add
slapconfiguration:jsonschema
recipe. This validates the parameter dict against the JSON schema, and fills in defaults from the schema first if the property is not set by the user. This allows for a unique source of truth in default parameters :) It also uses the serialisation in the schema to determine how the parameters should be parsed (xml
orjson-in-xml
). It requires downloading the JSON schemas in the SR.- This works for both regular instance parameters and for shared instance parameters.
- Errors in the regular instance parameters lead to a raised exception, but errors in shared instance parameters just result in this shared instance being collected in
invalid-slave-instance-list
instead ofslave-instance-list
.
-
Add a
without-defaults
toggle toslapconfiguration:jsonschema
to allow merely validating against the schema without adding in default values as specified in the schema for unprovided parameters.