Open
Description
-
Create snapshot:
- self users can snapshot their VMs
- a snapshot uses all the types of resources even if it was created by an admin
- a self user can't snapshot if there aren't enough resources available
- an admin is always able to snapshot even if it uses more than the available resources
- a "snapshot with memory" uses the same resources as a standard snapshot
-
Delete snapshot:
- self users can only delete their snapshots
- deleting a snpashot releases its resources
-
Delete VM:
- deallocate the VM's resources
- deallocate the snapshots' resources
-
Revert:
- a self user can revert any snapshot on their VMs
- reverting a snapshot updates the quotas
- if reverting a snapshot means using more than the available resources, then the revert fails
- an admin is always able to revert even if it uses more than the available resources
- the VM keeps its original resource set (if any) through the reverting process
- properly re-alloc the snapshot's IP addresses
-
"Snapshot before": (moved to client side, thus behaves as normal snapshot)
- the "snapshot before" feature tries to create a snapshot (and consume some resources) (chore(xo-web,xo-server): move "snapshot before" feature to the client #4893)
- if there aren't enough resources to "snapshot before", the whole revert operation fails (chore(xo-web,xo-server): move "snapshot before" feature to the client #4893)
- an admin is always able to "snapshot before" (chore(xo-web,xo-server): move "snapshot before" feature to the client #4893)
-
Remove user from resource set:
- all their permissions on VMs are revoked (fix(xo-server/self): remove ACLs when user is removed from resource set #4874)
- all their permissions on snapshots are revoked
-
Add a VM to a resource set:
- its snapshots are also added to the resource set, except the backup-related ones
- all the quotas allocations are forced because this is always done by an admin
-
Remove a VM from a resource set
- all the resource set's subjects have their permissions on the VM revoked
- all the resource set's subjects have their permissions on the VM's snapshots revoked
- the VM's resource usage is removed from quotas
- the VM's snapshots' are removed from the resource set
- the VM's snapshots' resource usages are removed from the quotas
-
Share a VM within a resource set
- "share" its snapshots (ie the RS subjects get permissions on them) except the backup-related ones
-
Convert to template
- self-users can't convert their VMs
- when an admin converts a VM to a template, the VM is removed from the resource set
-
self-users can create a VM from a snapshot
-
self-users can export a snapshot
-
Recompute all limits:
- take snapshots into account but
- ignore backup-related snapshots