meta: automatically allow devices as input in the stages schemas
With the new `bootc install to-filesystem` support many stages
will need a devices/mount setup to bind mount the deployment root
from the bootc deployment root of the generated image. To make
this globally available just allow "devices/mounts" for all stages
in the schema validation.
Note that `mounts` is already globally allowed so this just adds
devices (this was added in `7e776a076` with ostree as the use-case).
Nothing will change for the filesystem stages that already define
"devices" in a more specialized way.
This commit is contained in:
parent
5b75592fef
commit
659f1f06f2
2 changed files with 16 additions and 0 deletions
|
|
@ -410,6 +410,11 @@ class ModuleInfo:
|
|||
schema["properties"]["mounts"] = {
|
||||
"type": "array"
|
||||
}
|
||||
if "devices" not in schema["properties"]:
|
||||
schema["properties"]["devices"] = {
|
||||
"type": "object",
|
||||
"additionalProperties": True,
|
||||
}
|
||||
schema["required"] = [type_id]
|
||||
elif self.type in ("Device"):
|
||||
schema["additionalProperties"] = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue