"use strict"; const {createDataObject, LocalProperties, ID} = require("../../packages/graphql-interface/data-object"); module.exports = function (types) { return function LVMPhysicalVolume({ path }) { return createDataObject({ [LocalProperties]: { path: path, blockDevice: () => { return types.BlockDevice({ path: path }); } }, lvmPhysicalVolumes: { [ID]: path, volumeGroup: (volume) => { if (volume.volumeGroup != null) { return types.LVMVolumeGroup({ name: volume.volumeGroup }); } }, format: "format", size: "totalSpace", freeSpace: "freeSpace", duplicate: "isDuplicate", allocatable: "isAllocatable", used: "isUsed", exported: "isExported", missing: "isMissing" } }); }; };