use of org.ovirt.engine.api.model.MemoryOverCommit in project ovirt-engine by oVirt.
the class V3MemoryOverCommitInAdapter method adapt.
@Override
public MemoryOverCommit adapt(V3MemoryOverCommit from) {
MemoryOverCommit to = new MemoryOverCommit();
to.setPercent(from.getPercent());
return to;
}
use of org.ovirt.engine.api.model.MemoryOverCommit in project ovirt-engine by oVirt.
the class ClusterMapper method map.
@Mapping(from = Cluster.class, to = MemoryPolicy.class)
public static MemoryPolicy map(Cluster entity, MemoryPolicy template) {
MemoryPolicy model = template != null ? template : new MemoryPolicy();
model.setOverCommit(new MemoryOverCommit());
model.getOverCommit().setPercent(entity.getMaxVdsMemoryOverCommit());
model.setTransparentHugepages(new TransparentHugePages());
model.getTransparentHugepages().setEnabled(entity.getTransparentHugepages());
return model;
}
Aggregations