meta: allow mounts for all stages

If a stage has not itself defined the `mounts` property, allow any
mounts. This is in preparation to support specialized mounts, such
as bind mounts or ostree deployment mounts to transparently work
with any stage.
NB: devices are not allowed so this will not be applicable for the
current filesystem mounts.
This commit is contained in:
Christian Kellner 2021-10-08 15:12:26 +00:00 committed by Tom Gundersen
parent 5b1cd2b1c5
commit 7e776a0763

View file

@ -331,6 +331,10 @@ class ModuleInfo:
type_id: {"enum": [self.name]},
**opts,
}
if "mounts" not in schema["properties"]:
schema["properties"]["mounts"] = {
"type": "array"
}
schema["required"] = [type_id]
elif self.type in ("Device"):
schema["additionalProperties"] = True