a-kenji
5a81adfc68
pkgs/clan: Add machine validator with suggestion logic
...
Add machine validator with suggestion logic to:
- `clan machines update`
- `clan machines delete`
- `clan machines update-hardware-config`
2025-06-27 12:32:36 +02:00
Qubasa
f09656bbf6
clan-cli: Move delete.py to clan_lib/machines
2025-06-24 11:37:21 +02:00
Johannes Kirschbauer
e6d1f71907
Feat(inventory): remove legacy action functions
...
Inventory should only and always be accessed through the inventory store.
Manually reading and writing to the json file is highly insecure
2025-05-27 17:20:04 +02:00
Qubasa
8b1968cca6
clan-cli: Move Machine object to clan_lib
2025-05-22 19:11:19 +02:00
lassulus
2de3dcef15
clan-cli: clan_cli.inventory -> clan_lib.inventory
2025-05-21 12:06:38 +02:00
lassulus
ed89352ea1
clan-cli: clan_cli.dirs -> clan_lib.dirs
2025-05-20 12:08:30 +02:00
Qubasa
01f9bb358e
clan-cli: Use machine object everywhere instead of name + flake
2025-05-09 13:13:14 +02:00
Qubasa
89decdaf7e
clan-cli: Refactor the API to use the Flake object
2025-05-07 16:43:50 +00:00
Jörg Thalheim
1037bd115b
Revert "Merge pull request 'clan-cli: Refactor the API to use the Flake object' ( #3531 ) from Qubasa/clan-core:replace_machine_name_with_machine_obj into main"
...
This reverts commit c09618b323 , reversing
changes made to 45b2539455 .
2025-05-07 15:24:57 +02:00
Qubasa
a6a69bb09b
clan-cli: Refactor the API to use the Flake object
2025-05-07 13:12:48 +02:00
Johannes Kirschbauer
f67bf3c940
Fix(clan_lib.api): fix cyclic import problem for api schema export
2025-04-26 20:19:23 +02:00
Johannes Kirschbauer
f6628ec1a9
Refactor(clan_lib): move clan_cli.api into clan_lib.api
2025-04-26 19:51:35 +02:00
Johannes Kirschbauer
9b96f87160
Chore(clan/clan_uri): Remove ClanURI class from clan_cli
2025-04-23 16:53:11 +02:00
Jörg Thalheim
3ac1907201
use machine.{secrets,public}_{vars,fact}_store everywhere
2025-04-22 18:20:35 +02:00
Louis Opter
4120a89115
clan-cli: do not crash if a machine being deleted is missing from the inventory
...
We implement that by actually raising `KeyError` in `inventory.delete_by_path`
(as advertised in the docstring), since it makes more sense to catch a
`KeyError` than a generic `ClanError`.
2025-03-19 10:53:38 +00:00
Louis Opter
cd248b69db
clan-cli: machines delete: delete the machine's vars and secrets
...
When a machine is deleted with `clan machines delete`, remove its
vars and legacy secrets, and update any secrets that reference the
machine's key.
This command is a superset of `clan secrets machine delete`, and I am
wondering if we could remove the `clan secrets machine` subcommand,
unless there is an use case for having a machine defined without its
key, and any secrets/vars?
Note:
- This deletes the `ListSecretsOptions` dataclass, as it did not seem to
bring any value, especially since `list_secrets` was receiving its
individual members instead of the whole dataclass. We can always bring
it back if complexity grows to demand it.
2025-03-19 10:53:38 +00:00
Johannes Kirschbauer
2c0567ca27
Cli: delete machines bugfix. Dont modify the inventory in other places
2025-02-15 09:03:54 +07:00
lassulus
2a8f40e91a
clan_cli machines: use Flake instead of FlakeId
2025-02-07 06:26:09 +01:00
Johannes Kirschbauer
959ab140a6
Inventory: init delete patial data
2024-12-10 21:19:04 +01:00
Johannes Kirschbauer
096ddea270
Inventory: fix persistence
2024-12-10 16:41:40 +01:00
Johannes Kirschbauer
69b7f6be5b
inventory.{cli,api}: use only dictionaries
2024-12-06 18:51:20 +01:00
Johannes Kirschbauer
813172119e
API: rename set_inventory
2024-09-13 16:11:10 +02:00
Jörg Thalheim
e150b37fb8
enable ASYNC, DTZ, YTT and EM lints
2024-09-02 14:07:06 +02:00
Jörg Thalheim
b313f2d066
make all same-module imports relative, the rest absolute
...
This makes sorting more consitent.
2024-09-02 13:00:19 +02:00
Johannes Kirschbauer
871fa8f1ff
Inventory: add load_eval method
2024-07-24 10:34:10 +02:00
Johannes Kirschbauer
fbe27bfa0a
Classgen: add mapped keys and more stuff
2024-07-18 21:58:36 +02:00
Jörg Thalheim
6037ad1ce0
move FlakeId to flake id
...
move FlakeId to flake id
2024-07-03 18:28:55 +02:00
Johannes Kirschbauer
3227de583f
API: tests for module instance update
2024-07-02 16:09:13 +02:00
Johannes Kirschbauer
1efadb5e3d
API: migrate machines delete and list to inventory
2024-07-02 11:07:11 +02:00
a-kenji
32a20caad4
clan: add dynamic completions
...
Add dynamic completion scaffolding to the clan `cli`.
Also add a dynamic completion mechanism for machines for commands that
have machines as their sole argument.
More intricate dynamic completions will be implemented in follow up
PR's.
2024-05-31 12:55:41 +02:00
lassulus
082d628497
clan_cli: flake_name -> flake_dir
2023-11-15 16:23:28 +01:00
Qubasa
b09448ab6b
Updated to main
2023-10-27 19:15:11 +02:00
DavHau
a56073b051
machines delete: fix - delete all existing files
2023-09-02 18:37:40 +02:00
Jörg Thalheim
c5b16124ef
add machine subcommand
2023-08-24 16:58:22 +02:00