@stordata/vsphere-soapify
Version:
A NodeJS abstraction layer for the vSphere SOAP API
30 lines (26 loc) • 780 B
JavaScript
;
const _ = require('lodash'),
DynamicData = require('./DynamicData');
module.exports = class VirtualMachineSnapshotTree extends DynamicData {
flatten(parent) {
return [
{ parent, ..._.omit(this, 'childSnapshotList') },
_.map(this.childSnapshotList, child => child.flatten(this.id))
];
}
static mappings() {
return {
backupManifest: 'xsd:string',
childSnapshotList: VirtualMachineSnapshotTree.ArrayOf,
createTime: 'xsd:dateTime',
description: 'xsd:string',
id: 'xsd:int',
name: 'xsd:string',
quiesced: 'xsd:boolean',
replaySupported: 'xsd:boolean',
snapshot: 'ManagedObjectReference',
state: 'VirtualMachinePowerState',
vm: 'ManagedObjectReference'
};
}
};