source: don't mark search_drivers required
In the source autoinstall section, the search_drivers key was marked required. This made sense at the time when it was the only supported key. However, now that we also support the source ID, we don't want to force the user to supply search_drivers as well. Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
parent
0c73bf9b86
commit
566f32b01e
|
@ -127,10 +127,7 @@
|
|||
"id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"search_drivers"
|
||||
]
|
||||
}
|
||||
},
|
||||
"network": {
|
||||
"oneOf": [
|
||||
|
|
|
@ -64,7 +64,6 @@ class SourceController(SubiquityController):
|
|||
"type": "string",
|
||||
},
|
||||
},
|
||||
"required": ["search_drivers"],
|
||||
}
|
||||
# Defaults to true for backward compatibility with existing autoinstall
|
||||
# configurations. Back then, then users were able to install third-party
|
||||
|
@ -89,11 +88,7 @@ class SourceController(SubiquityController):
|
|||
# "source: null" despite "type" being "object"
|
||||
data = {**self.autoinstall_default, "id": None}
|
||||
|
||||
# search_drivers is marked required so the schema validator should
|
||||
# reject any missing data.
|
||||
assert "search_drivers" in data
|
||||
|
||||
self.model.search_drivers = data["search_drivers"]
|
||||
self.model.search_drivers = data.get("search_drivers", True)
|
||||
|
||||
# At this point, the model has not yet loaded the sources from the
|
||||
# catalog. So we store the data and lean on apply_autoinstall_config.
|
||||
|
|
Loading…
Reference in New Issue