A domain snapshot is a "moment in time" of a domain. After a
snapshot is created, a domain can be reverted to that snapshot
(i.e. reverted to the exact same state it was when the snapshot
was created). If a snapshot is created while the domain is
stopped, only its disks will be used in that snapshot; otherwise,
its memory state will also be used.
A snapshot can be created on top of another snapshot, which makes
it possible to have a tree-like snapshot structure for each
domain. When a snapshot is created, the last snapshot used in that
domain execution will be its parent. If there are no previous
snapshot in that execution, the new snapshot will have no parent.
Existing functions which also deal with snapshots will be
updated.
POST /vms/<vm-name>/snapshots
name: The snapshot name (optional). If omitted, a
default name will be used.
An asynchronous Task with "target_uri" containing "/vms/<vm-name>/snapshots/<new-snapshot-name>".
As expected with any Task, the process can be tracked by checking
the corresponding task's status.
GET /vms/<vm-name>/snapshots/<snapshot-name>
None.
A snapshot structure with the following properties:
name: The snapshot name.
state: The corresponding domain state when the snapshot
was created.
created: The time when the snapshot was created (in
seconds, since the epoch).
parent: The name of the parent snapshot, or an empty
string if there is no parent.
GET /vms/<vm-name>/snapshots
parent: The name of the parent snapshot of the requested
snapshots (optional). If omitted, only the "root" snapshots for
that domain will be returned.
A list of the structures returned by the action "Look up one
domain snapshot". All snapshots returned by this call will have "parent"
as their parents.
PUT /vms/<vm-name>/snapshots/<snapshot-name>
name: The new snapshot name.
The structure returned by the action "Look up one domain
snapshot" with the updated values.
DELETE /vms/<vm-name>/snapshots/<snapshot-name>
None.
None.
POST /vms/<vm-name>/snapshots/<snapshot-name>/revert
None.
None.
GET /vms/<vm-name>
None.
current-snapshot: the snapshot name in which the domain
execution is on, or an empty string if there is no current
snapshot.
DELETE /vms/<vm-name>
None.
None.
POST /vms/<vm-name>/clone
None.
Any feedback is welcome.
Best regards,
CrÃstian.