UNPKG

@stordata/vsphere-soapify

Version:

A NodeJS abstraction layer for the vSphere SOAP API

21 lines (16 loc) 555 B
'use strict'; const _ = require('lodash'), DynamicData = require('./DynamicData'), VirtualMachineSnapshotTree = require('./VirtualMachineSnapshotTree'); module.exports = class VirtualMachineSnapshotInfo extends DynamicData { constructor(client, source) { super(client, source); this.snapshotList = _.flatMapDeep(this.rootSnapshotList, snapshot => snapshot.flatten()); } static mappings() { return { currentSnapshot: 'ManagedObjectReference', rootSnapshotList: VirtualMachineSnapshotTree.ArrayOf }; } };