mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-11-29 20:36:00 +00:00
fifloader: co-operatively merge settings from ProductDefaults
This allows us to set defaults for settings in ProductDefaults and have the settings dicts in individual products merge with them, not overwrite them. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
4b79665c02
commit
b1b021ffd6
@ -183,6 +183,10 @@ def merge_inputs(inputs, validate=False, clean=False):
|
||||
schema_validate(data, fif=True, state="predefault")
|
||||
for (pname, product) in data["Products"].items():
|
||||
temp = dict(data.get("ProductDefaults", {}))
|
||||
if "settings" in product and "settings" in temp:
|
||||
# merge settings co-operatively
|
||||
prodsetts = product.pop("settings")
|
||||
temp["settings"].update(prodsetts)
|
||||
temp.update(product)
|
||||
data["Products"][pname] = temp
|
||||
# validate against incomplete schema
|
||||
|
||||
Loading…
Reference in New Issue
Block a user