1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/instances
catborise f1f52aac42 refactor: the API's serializers and the new VM form no longer need models
Networks, Interfaces, Storages, Storage, Volume, MigrateInstance and
CreateInstance were unmanaged models with no table, there only so that
ModelSerializers and the new VM ModelForm could take their fields. They
made content types and migrations, and their DO_NOTHING foreign keys
added reverse accessors that meant nothing (Compute.host,
Compute.target_host, Instance.source_host).

The serializers are plain Serializers and NewVMForm a Form, field for
field as the models gave them (types, lengths, required, defaults, the
minimum of 1 for vCPUs, memory and disk size; the form's labels are
still derived from the field names). Compared field by field before and
after, the API schema changes only where the models were wrong:
- no int64 bounds on the listing fields;
- the interface fields lose the titles that named the wrong column
  (type was "Status", state "Device", mac "Forward");
- a pool's volumes is a list of objects (it was described as an
  integer) and a volume's allocation an integer (it was untyped).
One migration per app deletes the models; none touches a table.
2026-11-06 13:46:27 +03:00
..
api refactor: the API's serializers and the new VM form no longer need models 2026-11-06 13:46:27 +03:00
migrations refactor: the API's serializers and the new VM form no longer need models 2026-11-06 13:46:27 +03:00
templates feat(jobs): deleting a VM is a job that recovery finishes 2026-11-06 09:49:31 +03:00
templatetags chore: remove files nothing uses 2026-11-06 10:53:43 +03:00
tests fix(instances): a VM list poll for a host id that is not a number is 404 2026-11-06 13:46:27 +03:00
__init__.py chore: remove code nothing uses 2026-11-06 10:53:37 +03:00
addresses.py feat(webvirtcloud): a request waiting on a host holds one thread, not a worker 2026-11-02 21:19:01 +03:00
apps.py format python code with black 2022-11-02 08:54:35 +03:00
forms.py refactor: the API's serializers and the new VM form no longer need models 2026-11-06 13:46:27 +03:00
jobs.py feat(jobs): deleting a VM is a job that recovery finishes 2026-11-06 09:49:31 +03:00
models.py refactor: the API's serializers and the new VM form no longer need models 2026-11-06 13:46:27 +03:00
report.py perf: the Logs and VM report downloads are written row by row 2026-11-05 18:58:13 +03:00
states.py feat(instances): the Power tab shows the VM's state and where each action takes it 2026-11-03 19:22:52 +03:00
urls.py chore: remove code nothing uses 2026-11-06 10:53:37 +03:00
utils.py fix(instances): recording a migration holds the ownership lock 2026-11-05 18:58:13 +03:00
views.py fix(instances): a VM list poll for a host id that is not a number is 404 2026-11-06 13:46:27 +03:00