1.7 KiB
Go Agent domain_delete contract
This slice implements a narrow, identity-bound libvirt definition undefine operation. It is not the panel's full VM deletion workflow.
Host boundary
- The request payload is exactly
{ "uuid": "<canonical UUID>" }. InspectDomainForDeletionperforms a targeted read-onlydumpxml --inactiveanddomstateobservation. It does not enumerate domains or touch storage, networking, firewall state, or seed artifacts.DeleteDomainrefuses an active domain. It invokes onlyvirsh undefine --domain <canonical UUID>and then requires a targeted absence read-back before returning success.- Fake and virsh backends report only a SHA-256 XML digest; raw XML and host paths never enter the operation result or journal.
storage_removed=falseandnetwork_changed=falseare explicit result facts. The operation never deletes disks or changes a network.
If the undefine command or absence read-back is ambiguous, the operation is
uncertain. Reconciliation calls only InspectDomainForDeletion; it never
replays undefine. A present definition, failed transport, or missing state
read-back therefore cannot become a false success.
PHP boundary
The Go API accepts domain_delete, but the PHP CloudAgentVmGateway keeps the
legacy panel delete mapping disabled (null). The existing panel operation
also owns disk/seed cleanup, billing state, firewall history, and irreversible
instance tombstoning. Mapping it to definition-only undefine would report a
successful VM deletion while leaving those resources behind. A future mapping
requires a separate typed storage/seed/network cleanup contract, panel CAS
updates, and real-host read-back evidence.