Jörg Thalheim
8fe7cb1b3d
virtiofsd: fix nix chroot store support
2025-08-19 14:47:12 +02:00
DavHau
815c6c9438
vars: move generation functions to clan_lib
2025-08-19 18:05:53 +07:00
DavHau
9ce563aa08
vars: log var updates under specific machine
...
This makes it easier in the logs to identify which machine a var update belongs to
2025-08-19 11:03:36 +00:00
DavHau
ab274ce932
vars: refactor - remove generate_vars() in favor of run_generators()
...
The motivation is to have one shared entry point for the CLI as well as API/GUI
2025-08-19 16:26:53 +07:00
DavHau
aadc8a1d63
vars: refactor - remove _generate_vars_for_machine function
...
This became unnecessary by now
2025-08-19 07:41:31 +00:00
DavHau
aaca8f4763
vars: refactor - move generator specific code to Generator class
...
Several functions in generate.py were specific to generator instances. Let's move them into the Generator class
2025-08-19 07:41:31 +00:00
DavHau
ee87f20471
vars: refactor - remove create_machine_vars_interactive in favor of run_generators
...
The motivation is to create one powerful entrypoint shared by the GUI as well as the CLI in order to not having to maintain too much separate code paths.
As a next step, generate_vars can probably also be removed.
2025-08-19 13:26:38 +07:00
Johannes Kirschbauer
f82d18d649
API: rename util file to 'type_to_jsonschema'
2025-08-18 19:30:43 +02:00
Johannes Kirschbauer
287a303484
API/schema: make type conversion more strict in terms of undefined fields
2025-08-18 19:29:54 +02:00
Johannes Kirschbauer
1213608f30
API: init support for narrowing union types
...
This allows to relax constraints on functions using overloaded interfaces
I.e. for unifying logic this allows passing 'callable | dict'
Conretely useful for prompt values that are asked on demand in the cli, vs upfront in the ui
2025-08-18 19:28:47 +02:00
hsjobeki
e109361e81
Merge pull request 'clanModules: remove unused code' ( #4785 ) from clean-dead-code into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4785
2025-08-16 11:03:16 +00:00
Johannes Kirschbauer
03968d8fbc
api/inventory: remove leaked schemas
2025-08-16 12:56:30 +02:00
Johannes Kirschbauer
2f27b3941e
lib/inventory: limit access to defined keys
2025-08-16 12:56:30 +02:00
Johannes Kirschbauer
9fe457ebd5
lib/clanModules: update nix_models
2025-08-16 11:59:16 +02:00
Johannes Kirschbauer
4a51aa9316
clanModules: remove unused test code
2025-08-16 11:58:55 +02:00
Mic92
ed78e49c47
Merge pull request 'vms/inspect: mark test as pure' ( #4781 ) from no-impure into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4781
2025-08-15 11:54:46 +00:00
Jörg Thalheim
3ef0a7919d
vms/inspect: mark test as pure
2025-08-15 13:31:27 +02:00
Jörg Thalheim
36812d5f95
test_vars_deployment: simplify test to just start one vm
2025-08-15 13:30:30 +02:00
Mic92
f5bcdb4ba0
Merge pull request 'flakes/inspect: mark test as pure' ( #4779 ) from no-impure into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4779
2025-08-15 11:28:22 +00:00
Jörg Thalheim
b69ad0eca5
backups/list: mark as pure
2025-08-15 13:10:41 +02:00
Jörg Thalheim
b221c29694
flakes/inspect: mark test as pure
2025-08-15 13:08:30 +02:00
Mic92
ec3d224e1d
Merge pull request 'tests_secrets_generate: mark as pure' ( #4766 ) from no-impure into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4766
2025-08-15 11:06:47 +00:00
Jörg Thalheim
c4d9b39a17
tests_secrets_generate: mark as pure
2025-08-15 12:51:20 +02:00
Luis Hebendanz
cc41185f98
Merge pull request 'flake.py: Error messages are now always ClanSelectErrors. Improved error messages' ( #4773 ) from Qubasa/clan-core:improve_select_error into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4773
2025-08-15 06:50:46 +00:00
Qubasa
606aae7212
flake.py: Error messages are now always ClanSelectErrors. Improved error messages
...
flake.py: Fix unbound variable
flake.py: Fix test_create.py test
2025-08-15 13:46:12 +07:00
Jörg Thalheim
716b74bc02
test_machines_cli: remove more tests from the impure set
2025-08-14 17:14:35 +02:00
Mic92
3586b4f48c
Merge pull request 'clan-cli/machines/list: mark test as pure' ( #4761 ) from no-impure-machines into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4761
2025-08-14 14:59:10 +00:00
Jörg Thalheim
9cdc6a27b6
test_copy_from_nixstore_symlink: drop test.
...
seems a bit overkill to have a test for two lines of python code...
2025-08-14 16:53:39 +02:00
Jörg Thalheim
96014c02c5
clan-cli/templates: mark tests as pure
2025-08-14 16:35:25 +02:00
Jörg Thalheim
810a2c67f9
clan-cli/machines/list: mark test as pure
2025-08-14 16:33:21 +02:00
Jörg Thalheim
fbb28afb2f
clan-cli/flash: make tests runnable in sandbox
2025-08-14 16:23:22 +02:00
hsjobeki
a6ef38dadd
Merge pull request 'vars: move generator class and bound methods into seperate module' ( #4734 ) from generator-class into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4734
2025-08-14 14:17:14 +00:00
Jörg Thalheim
21e6a01cf3
machines/list: make tests pure
2025-08-14 15:54:00 +02:00
pinpox
35e5f4a42a
Remove clanModules
...
- Removes clanModules in favor of the new clanServices
- Adds a warning and link to the migration guide
2025-08-14 12:02:40 +02:00
Johannes Kirschbauer
4312e3fc2f
vars: move generator class and bound methods into seperate module
2025-08-14 11:05:42 +02:00
hsjobeki
7fdbd2e3eb
Merge pull request 'dirs: remove unused conditional import' ( #4736 ) from import-cleanup-dirs into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4736
2025-08-13 17:46:19 +00:00
hsjobeki
7daebd5ee0
Merge pull request 'networking: remove unused conditional import' ( #4737 ) from networking-import into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4737
2025-08-13 17:46:04 +00:00
hsjobeki
cc8dd0564b
Merge pull request 'askpass: use protocol as interface' ( #4739 ) from interface-askpass into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4739
2025-08-13 17:43:01 +00:00
Johannes Kirschbauer
e28f280036
vars: remove unused conditional import
2025-08-13 19:24:53 +02:00
Johannes Kirschbauer
6fa2a977df
askpass: use protocol as interface
...
Avoids a cyclic dependency on the Remote class
Strips down the dependency closure by explizitly declaring what functions it needs
2025-08-13 19:21:18 +02:00
Johannes Kirschbauer
65dba2508f
dirs: remove unused conditional import
2025-08-13 19:04:32 +02:00
Johannes Kirschbauer
9884643070
networking: remove unused conditional import
2025-08-13 19:03:35 +02:00
Johannes Kirschbauer
5083992f7b
lib: remove unused TYPE_CHECKING
2025-08-13 18:26:57 +02:00
Johannes Kirschbauer
6bd8839128
lib/Remote: Unify class method _parse_ssh_uri with class file
2025-08-13 18:26:28 +02:00
DavHau
72d3ad09a4
vars: refactor - pass Machine objects to run_generators
2025-08-13 12:45:47 +00:00
DavHau
a535450ec0
vars: refactor - unify get_generators and _get_closure
2025-08-13 12:45:47 +00:00
Mic92
d3b423328f
Merge pull request 'Add wireguard service module' ( #3354 ) from init-wireguard-service into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3354
2025-08-13 10:55:48 +00:00
Jörg Thalheim
1177e84dcc
vars/generate: print the files that were found when files are missing
...
this helps fixing typos in the generator scripts
2025-08-13 12:29:52 +02:00
DavHau
24194011ac
vars: refactor - remove unnecessary return values
...
The boolean return value signaling if anything was ran or not isn't that useful. We are not doing anything with it.
2025-08-13 12:54:05 +07:00
DavHau
068b5d4c1e
install: fix error message when target host not specified
2025-08-13 12:04:14 +07:00