fix(xapi/VM_getDisks): sync iteration

This commit is contained in:
Julien Fontanet 2021-03-04 16:09:13 +01:00
parent eeebd3fc1b
commit 855a15e696

View File

@ -364,7 +364,7 @@ module.exports = class Vm {
async getDisks(vmRef) {
const disks = { __proto__: null }
;(await this.getRecords('VBD', await this.getField('VM', vmRef, 'VBDs'))).map(async vbd => {
;(await this.getRecords('VBD', await this.getField('VM', vmRef, 'VBDs'))).forEach(vbd => {
if (vbd.type === 'Disk' && isValidRef(vbd.VDI)) {
disks[vbd.VDI] = true
}