Add hardware-linked USB intake and inspection workflow
This commit is contained in:
@@ -331,3 +331,11 @@ eigene Datensätze erhalten (Migration 0011).
|
||||
Vor dem Update einer bestehenden Installation eine Datenbanksicherung
|
||||
erstellen, dann `python manage.py migrate` ausführen. Ein Löschen der
|
||||
Datenbank ist nicht nötig und würde Geräte und Benutzerkonten entfernen.
|
||||
|
||||
## USB AIO station API
|
||||
|
||||
The USB station resolves hardware identity with `POST /api/v1/devices/resolve/`, then reads the returned inventory number, workflow `stage`, and status. For `INTAKE` devices only, `POST /api/v1/devices/<number>/intake/` accepts verified CPU/model/RAM/storage measurements plus `hwid` and `expected_revision`. Later workflow stages reject intake writes.
|
||||
|
||||
`POST /api/v1/devices/<number>/inspection/` accepts a UUID `request_id`, `hwid`, `expected_revision`, phase (`STARTED`, `IN_PROGRESS`, `COMPLETE`), technician, notes and a dictionary of test results. Each result preserves outcome, notes, evidence and attempt history. The API moves allowed devices to `INSPECTION`, sets status to `Inspektion`, adds a readable inspection record and retains the structured snapshot. A unique request ID prevents duplicate records after lost responses; reused IDs with different content are rejected. Inventory workflow checks, hardware matching and API-key permissions remain enforced. Completed inspections require a named technician and no unfinished results; unavailable tests remain distinct from hardware failures.
|
||||
|
||||
Apply migrations through `0015_inspectionsubmission` before deploying the new USB application. Wi-Fi credentials and inventory API keys stay on USB persistent storage, not in this repository.
|
||||
|
||||
Reference in New Issue
Block a user