clan-cli: Remove allow_uknown_placeholders flag. With upcoming nixos-anywhere patch this is not needed anymore.

This commit is contained in:
Qubasa
2025-02-23 21:50:21 +01:00
parent ad3786ad76
commit d7c4a5d59d

View File

@@ -138,7 +138,6 @@ def set_machine_disk_schema(
# Use get disk schemas to get the placeholders and their options # Use get disk schemas to get the placeholders and their options
placeholders: dict[str, str], placeholders: dict[str, str],
force: bool = False, force: bool = False,
allow_uknown_placeholders: bool = False,
) -> None: ) -> None:
""" """
Set the disk placeholders of the template Set the disk placeholders of the template
@@ -172,6 +171,7 @@ def set_machine_disk_schema(
# For every placeholder check that the value is valid # For every placeholder check that the value is valid
for placeholder_name, placeholder_value in placeholders.items(): for placeholder_name, placeholder_value in placeholders.items():
ph = disk_schema.placeholders.get(placeholder_name) ph = disk_schema.placeholders.get(placeholder_name)
# Unknown placeholder # Unknown placeholder
if not ph: if not ph:
msg = ( msg = (
@@ -183,11 +183,7 @@ def set_machine_disk_schema(
) )
# Invalid value. Check if the value is one of the provided options # Invalid value. Check if the value is one of the provided options
if ( if ph.options and placeholder_value not in ph.options:
ph.options
and placeholder_value not in ph.options
and not allow_uknown_placeholders
):
msg = ( msg = (
f"Invalid value {placeholder_value} for placeholder {placeholder_name}" f"Invalid value {placeholder_value} for placeholder {placeholder_name}"
) )