use of org.ovirt.engine.api.model.GlusterBrickMemoryInfo in project ovirt-engine by oVirt.
the class V3GlusterBrickMemoryInfoInAdapter method adapt.
@Override
public GlusterBrickMemoryInfo adapt(V3GlusterBrickMemoryInfo from) {
GlusterBrickMemoryInfo to = new GlusterBrickMemoryInfo();
if (from.isSetMemoryPools()) {
to.setMemoryPools(new GlusterMemoryPools());
to.getMemoryPools().getGlusterMemoryPools().addAll(adaptIn(from.getMemoryPools().getGlusterMemoryPools()));
}
return to;
}
use of org.ovirt.engine.api.model.GlusterBrickMemoryInfo in project ovirt-engine by oVirt.
the class GlusterBrickDetailMapper method map.
@Mapping(from = MemoryStatus.class, to = GlusterBrickMemoryInfo.class)
public static GlusterBrickMemoryInfo map(MemoryStatus memoryStatusEntity) {
GlusterBrickMemoryInfo memInfo = new GlusterBrickMemoryInfo();
if (memoryStatusEntity == null) {
return null;
}
memInfo.setMemoryPools(new GlusterMemoryPools());
for (Mempool pool : memoryStatusEntity.getMemPools()) {
memInfo.getMemoryPools().getGlusterMemoryPools().add(map(pool));
}
return memInfo;
}
Aggregations