Update a domain snapshot
We can postpone it.
I think the most important operations are: create, delete and revert a snapshot. When we have those 3 operations done we can work on update.
CHANGE: List the current snapshot in a domain
I'd say to use the API /vms/<name>/snaphosts to provide this information.
You can do it by a parameter or using a specific API for it: GET /vms/<name>/snaphosts/current
- When creating a snapshot in a running domain, should we try to minimize the domain's downtime? There's a libvirt flag for that but it increases the memory dump file size.
As Kimchi can not deal well with paused domains yet, I suggest to use the libvirt flag to avoid this state.
But of course, we can revert it when we properly support paused state.
- When deleting a snapshot, should we keep their children or should we only delete that snapshot? Keep in mind that snapshots follow a tree-like structure. This feature is already implemented by libvirt, it makes no difference for us in the implementation (it's just a different flag), but we need to think if the user would expect that the snapshot's children will be deleted as well when deleting one snapshot.
I'd say to only remove the snapshot itself. But we could provide a check box to user select or not to remove all its children
In that case we need to accept a parameter on DELETE request
DELETE /vms/<name>/snapshots/<snap> {mode: node|all}
- The properties returned by the action "Look up one domain snapshot" are just the ones I thought it might be useful for now. A snapshot has more properties than that but I'm not sure if we should just dump everything.
No. We should provide and expose only the information needed by user otherwise they do not make sense.
- The property updated by the action "Update a domain snapshot" (i.e. "name") is the only one I thought it might be relevant. Other properties can be updated as well if we want to.
I only can think on name as well.