Commit Graph

44 Commits

Author SHA1 Message Date
Qubasa
068f89e453 clan_vm_manager: Rewrite of Machine Class Part 1 2024-03-08 15:32:12 +07:00
DavHau
02dd132e08 vms: init graceful shutdown for GUI
- add python modules for qemu protocols: QMP (hardware interactions) and QGA (guest service interaction)
- refactor state directory: remove name from path (already contains url)
- add impure vm test for basic qmp interaction
- simplify existing vm persistance test (factor out shared code)
- integrate graceful shutdown into GUI

the GUI integration still needs to be improved later:
- add fallback in case system doesn't react to powerdown button
- shutdown GUI switch fails if VM hasn't been started yet, and then remains in a wrong position
2024-02-09 19:55:18 +07:00
Qubasa
ab05cfde30 clan_manager: Implemented machine_icon, machine_description 2024-02-06 20:13:18 +07:00
Qubasa
21443d0647 cli,nix: Add machine_icon, machine_description 2024-02-06 19:25:34 +07:00
lassulus
6b004fca6f machines.Machine: refactor flake_dir -> flake; use Machine class in vm 2024-01-24 15:49:12 +01:00
Qubasa
b36d0be524 cmd.py part 3 refactor 2024-01-10 18:39:19 +01:00
Qubasa
699515ca89 Added ClanCmdError. cmd.run now returns this error 2024-01-10 17:58:39 +01:00
Qubasa
e0bba046ea history: added vm config to FlakeConfig 2023-12-31 14:56:03 +01:00
Qubasa
c4799f1e9a Added gcroot for clan Icon and VM 2023-12-31 00:49:57 +01:00
Qubasa
ca265b0c59 UI: Added process executor. Display vm status correctly in list. | CLI: Added get_qemu_version(), fixed virtio audio bug. 2023-12-26 18:02:43 +01:00
Qubasa
5c143bf2da Finished clan history command. Ported remaining async to sync funcs 2023-12-14 20:57:31 +01:00
Qubasa
1a36ef242f Fixed failing tests in machines and history cli, removed test_machines_api.py 2023-12-14 18:25:42 +01:00
Qubasa
c90053834a Reworked machines list, and history commands 2023-12-14 18:21:10 +01:00
Qubasa
771c0e43ca Moved history to own subcommand 2023-12-14 18:21:10 +01:00
Qubasa
30d55fc67e Used inspect commands in vm-manager 2023-12-09 00:45:12 +01:00
Qubasa
d4b8cef242 Added clan flakes inspect command. Improved ClanURI. Added democlan as dependency in flake.nix 2023-12-09 00:09:21 +01:00
Jörg Thalheim
1496f45fe2 prefix nixpkgs# explicitly in nix_shell
This makes the function usage less confusing (you can now tell from the call side what are flags and what is passed to nix-shell) and allows to use different flakes to download packages.
2023-12-08 15:14:14 +01:00
Qubasa
d7b1a9f959 clan-vm-manager: Fixed assets folder not included 2023-12-04 16:56:42 +01:00
Johannes Kirschbauer
bdcf5dbe8b extend clan history model 2023-12-02 16:16:38 +01:00
DavHau
e46d13d626 remove outdated comment 2023-12-01 16:11:31 +07:00
DavHau
261322fae8 flake history: make operations atomic 2023-12-01 14:00:15 +07:00
Jörg Thalheim
4fd84d1c48 disallow variable shadowing 2023-11-30 14:31:37 +01:00
Jörg Thalheim
f1b223d0a1 modernisation for python 3.11 2023-11-29 13:29:45 +00:00
Jörg Thalheim
26e3e3872c enable more linting 2023-11-29 13:29:45 +00:00
Jörg Thalheim
7afaaf8c5a get rid of pydantic in cli 2023-11-21 12:48:35 +00:00
DavHau
9f63f725d3 history: fix: store entries only once 2023-11-20 11:39:00 +07:00
DavHau
c46638f589 api/flake/history: implement review requests 2023-11-17 18:26:55 +07:00
DavHau
64649ff7a9 api/flake/list_history: init
Add an api endpoint to list the history of clan flakes that have been interacted with

Also add `clan flake list`
2023-11-17 17:56:14 +07:00
DavHau
999ad67277 api/flake/add: init
Adds an endpoint to memoize clans.
clan flakes can be added to the history either via the endpoint or by executing `clan flakes add`
2023-11-17 17:05:15 +07:00
lassulus
1ea13646ea clan_cli: flake_name -> flake_dir 2023-11-15 16:23:28 +01:00
Qubasa
efa48052cf API: Added /api/flake/list. Added API grouping and description for better visibility 2023-11-03 22:05:33 +01:00
lassulus
f4e7828725 switch flake to main branch again 2023-10-31 13:01:16 +01:00
Qubasa
4209da96e9 Fixed test_webui only failing in nix_sandbox 2023-10-29 19:35:29 +01:00
Qubasa
c1b4fa6d55 nix fmt 2023-10-27 19:21:50 +02:00
Qubasa
3581e0c9a8 Fixing a multitude of tests 2023-10-27 19:21:50 +02:00
Qubasa
d1c35301e3 Added repro_env_break debugging command. This spawn a terminal inside the temp home folder with the same environment as the python test 2023-10-27 19:20:17 +02:00
Qubasa
26bfb793b1 Added ref to Qubasa-main in template/new-clan/flake.nix 2023-10-27 19:20:17 +02:00
Qubasa
d02acbe04b nix fmt 2023-10-27 19:19:45 +02:00
Qubasa
af3f04736b Improved logging messages. Added ClanError if flake create or machine create already exist 2023-10-27 19:18:45 +02:00
Qubasa
8482bc79f6 Secrets tests passing. nix fmt doesn't complain 2023-10-27 19:18:45 +02:00
Qubasa
8cc1c2c4bd Fixed cyclic dependencie AND swapped pytest-parallel for pytest-xdist to fix deadlock in tests 2023-10-27 19:18:45 +02:00
Qubasa
2ca54afe7f Added new type FlakeName 2023-10-27 19:18:45 +02:00
Qubasa
32e60f5adc Added flake_name:str argument everywhere, nix fmt doesn't complain anymore 2023-10-27 19:15:40 +02:00
Qubasa
fdcd7ad1d9 Updated to main 2023-10-27 19:15:11 +02:00