fix(xo-server): do not count snapshots in self quotas (#2682)
Fixes #2626
This commit is contained in:
committed by
Julien Fontanet
parent
11d4cb2f04
commit
75521f8757
@@ -356,8 +356,10 @@ async function delete_ ({
|
||||
)
|
||||
|
||||
// Update resource sets
|
||||
const resourceSet = xapi.xo.getData(vm._xapiId, 'resourceSet')
|
||||
if (resourceSet != null) {
|
||||
if (
|
||||
vm.type === 'VM' && // only regular VMs
|
||||
xapi.xo.getData(vm._xapiId, 'resourceSet') != null
|
||||
) {
|
||||
;this.setVmResourceSet(vm._xapiId, null)::ignoreErrors()
|
||||
}
|
||||
|
||||
|
||||
@@ -335,6 +335,7 @@ export default class {
|
||||
let set
|
||||
if (
|
||||
object.$type !== 'vm' ||
|
||||
object.is_a_snapshot ||
|
||||
// No set for this VM.
|
||||
!(id = xapi.xo.getData(object, 'resourceSet')) ||
|
||||
// Not our set.
|
||||
|
||||
Reference in New Issue
Block a user