You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/integrations/storidge/models/volume.js

41 lines
1.2 KiB

export function StoridgeVolumeModel(data) {
this.Allocated = data.allocated;
this.Capacity = data.capacity;
this.Directory = data.directory;
this.IOPSMax = data.maximumIOPS;
this.IOPSMin = data.minimumIOPS;
this.BandwidthMin = data.minimumBandwidth;
this.BandwidthMax = data.maximumBandwidth;
this.LocalDriveOnly = data.localDriveOnly;
this.Name = data.name;
this.Node = data.node;
this.NodeID = data.nodeid;
this.Provisioning = data.provisioning;
this.Redundancy = data.redundancy;
this.Uuid = data.uuid;
this.Vdisk = data.vdisk;
this.Labels = data.labels;
this.IP = data.ipaddr;
this.DriveType = data.driveType;
this.Encryption = data.encryption;
this.SnapshotEnabled = data.snapshot;
this.SnapshotInterval = data.snapInterval;
this.SnapshotMax = data.maximumSnapshots;
this.Filesystem = data.filesystem;
}
export function StoridgeVolumeUpdateModel(data) {
this.name = data.Name;
this.opts = {
node: data.Node,
nodeid: data.NodeID,
capacity: data.Capacity,
iopsmin: data.IOPSMin,
iopsmax: data.IOPSMax,
bandwidthmin: data.BandwidthMin,
bandwidthmax: data.BandwidthMax,
};
this.labels = data.Labels;
}