1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/operations/tests
catborise c1d36053d6 feat(logs): every VM operation writes an audit row the VM's Logs tab finds by UUID
Operations on a VM now write their rows the way the admin audit does: one
row per operation, done or failed with a safe reason, with the user, IP and
host. Each row names the VM ("VM web-1: delete snapshot snap1") and carries
its UUID in the new Logs.instance_uuid column.

- audit_vm and failed_vm wrap audit() and failed() for a VM. A failure the
  view turns into a message is caught outside the block, so its failed row
  is written; busy claims, permission and quota refusals and invalid input
  write nothing. No password, key or XML goes into a row.
- All VM page operations move from addlogmsg to audit_vm, and addlogmsg
  goes. QoS changes and defining a VM from XML are logged now; a gstfsd
  error reply (root password, SSH key) is a failed row, not a done one.
- Partial results are rows of their own: the VM delete, then each disk
  delete; the disk detach, then the volume delete; the migration, then a
  failed autostart restore, NVRAM removal or record on the target.
- Migration rows use the compute name as the host column, as every other
  row does.
- VM job rows (create, clone, snapshots) and their resolutions carry the
  VM's UUID; snapshot job intents now record it. The owner rows of the VM
  page and the accounts pages, and the ownership system rows, carry it too.
- The Logs tab loads vm_logs/<pk>/ and shows the rows with the VM's UUID,
  so a rename keeps the history, two VMs with one name are told apart and
  a VM on two computes is one VM. It gains a Result column. Rows from
  before this change have no UUID and stay on the Logs page only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 14:14:53 +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(logs): every VM operation writes an audit row the VM's Logs tab finds by UUID 2026-10-24 14:14:53 +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