refactor: remove Machine.vars_generators() method
Replace all calls to machine.vars_generators() with direct calls to Generator.generators_from_flake() to make the dependency more explicit and remove unnecessary indirection. This reduces coupling to the Machine class, making the codebase more modular and easier to refactor in the future.
This commit is contained in:
@@ -91,7 +91,11 @@ def flash_machine(
|
||||
"users": {"root": {"openssh": {"authorizedKeys": {"keys": root_keys}}}}
|
||||
}
|
||||
|
||||
for generator in machine.vars_generators():
|
||||
from clan_cli.vars.generate import Generator
|
||||
|
||||
for generator in Generator.generators_from_flake(
|
||||
machine.name, machine.flake, machine
|
||||
):
|
||||
for file in generator.files:
|
||||
if file.needed_for == "partitioning":
|
||||
msg = f"Partitioning time secrets are not supported with `clan flash write`: clan.core.vars.generators.{generator.name}.files.{file.name}"
|
||||
|
||||
Reference in New Issue
Block a user