1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/operations/tests
catborise 8c0fbff8f7 feat(logs): admin changes and logins are recorded on the Logs page
The Logs page shows who added, changed or deleted a compute, from web
or API, and every login, failed login, lockout and logout, with the
client address and a Result column (Done, Failed, Unknown for older
rows). A failed change is recorded with its reason and the error still
reaches the user; a refused one is recorded too.

- logs.audit.write saves each row in its own savepoint and never
  raises, so a log write cannot break or undo the action it records.
  The audit() context manager writes one row when the change ends.
- Logs gains success and ip; user, host and instance are wider and
  date is indexed. The page orders by date then id.
- A compute edit names the changed fields; an edit that changes
  nothing writes no row, and an empty password field is no change.
- A compute's VMs leaving the panel get a system row each: owners
  kept on the Removed VMs page, moved to another compute, restored,
  left without owners, or the removed record expired.
- Job rows carry the result. A job's log entry that cannot be
  computed is logged and skipped instead of rolling back the finish
  (test_service.py changes this on purpose).
- Logins are recorded by signal receivers; CustomLoginView is removed
  and the plain LoginView is used. A wrong OTP code is a failed login,
  counted by django-axes toward the lockout.

Panel records and host-side objects follow in the next layers.
2026-10-23 10:30:48 +03:00
..
js feat(instances): a running VM can be cloned 2026-10-16 16:52:38 +03:00
__init__.py feat(operations): job, claim and worker lease models 2026-10-14 23:27:57 +03:00
fakes.py feat(operations): jobs a request runs 2026-10-16 11:53:59 +03:00
proc_kinds.py test(operations): workers and admissions across processes 2026-10-14 23:27:57 +03:00
test_api.py test(operations): another user's job cannot be cancelled 2026-10-16 21:58:54 +03:00
test_claims.py feat(operations): admit claims atomically; redact secrets 2026-10-14 23:27:57 +03:00
test_conf.py feat(operations): worker concurrency and job retention settings 2026-10-14 23:27:57 +03:00
test_hold.py refactor(computes): the lock helpers take claims instead of file locks 2026-10-14 23:27:57 +03:00
test_kinds.py feat(operations): jobs a request runs 2026-10-16 11:53:59 +03:00
test_models.py feat(operations): job, claim and worker lease models 2026-10-14 23:27:57 +03:00
test_panel_js.py feat(operations): job panel on the VM page 2026-10-14 23:27:57 +03:00
test_processes.py test(operations): a worker a process test cannot stop shows where it is stuck 2026-10-21 12:10:59 +03:00
test_recovery.py feat(operations): jobs a request runs 2026-10-16 11:53:59 +03:00
test_redact.py feat(operations): admit claims atomically; redact secrets 2026-10-14 23:27:57 +03:00
test_service.py feat(logs): admin changes and logins are recorded on the Logs page 2026-10-23 10:30:48 +03:00
test_views.py feat(instances): a running VM can be cloned 2026-10-16 16:52:38 +03:00
test_worker.py feat(operations): jobs a request runs 2026-10-16 11:53:59 +03:00