fix(xo-server/deleteVm): pass array to Promise.all

This commit is contained in:
Julien Fontanet
2018-11-16 18:10:47 +01:00
parent abeb36f06c
commit 6dcae9a7d7

View File

@@ -675,15 +675,15 @@ export default class Xapi extends XapiBase {
await this.call('VM.hard_shutdown', $ref) await this.call('VM.hard_shutdown', $ref)
} }
await Promise.all( await Promise.all([
this.call('VM.set_is_a_template', vm.$ref, false), this.call('VM.set_is_a_template', vm.$ref, false),
this._updateObjectMapProperty(vm, 'blocked_operations', { this._updateObjectMapProperty(vm, 'blocked_operations', {
destroy: null, destroy: null,
}), }),
this._updateObjectMapProperty(vm, 'other_config', { this._updateObjectMapProperty(vm, 'other_config', {
default_template: null, default_template: null,
}) }),
) ])
// must be done before destroying the VM // must be done before destroying the VM
const disks = getVmDisks(vm) const disks = getVmDisks(vm)