use of org.ovirt.engine.api.model.ProfileDetails in project ovirt-engine by oVirt.
the class V3EntityProfileDetailInAdapter method adapt.
@Override
public EntityProfileDetail adapt(V3EntityProfileDetail from) {
EntityProfileDetail to = new EntityProfileDetail();
if (from.isSetProfileDetail()) {
to.setProfileDetails(new ProfileDetails());
to.getProfileDetails().getProfileDetails().addAll(adaptIn(from.getProfileDetail()));
}
return to;
}
use of org.ovirt.engine.api.model.ProfileDetails in project ovirt-engine by oVirt.
the class GlusterVolumeProfileInfoMapper method mapProfileDetails.
private static void mapProfileDetails(List<StatsInfo> statsInfoList, EntityProfileDetail entityprofileDetail) {
for (StatsInfo statsInfo : statsInfoList) {
ProfileDetail profileDetail = new ProfileDetail();
profileDetail.setProfileType(statsInfo.getProfileStatsType().name());
profileDetail.setDuration(statsInfo.getDuration());
profileDetail.setStatistics(new Statistics());
profileDetail.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(TOTAL_READ), statsInfo.getTotalRead()));
profileDetail.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(TOTAL_WRITE), statsInfo.getTotalWrite()));
mapBlockStats(profileDetail, statsInfo);
mapFopStats(profileDetail, statsInfo);
entityprofileDetail.setProfileDetails(new ProfileDetails());
entityprofileDetail.getProfileDetails().getProfileDetails().add(profileDetail);
}
}
use of org.ovirt.engine.api.model.ProfileDetails in project ovirt-engine by oVirt.
the class V3NfsProfileDetailInAdapter method adapt.
@Override
public NfsProfileDetail adapt(V3NfsProfileDetail from) {
NfsProfileDetail to = new NfsProfileDetail();
if (from.isSetNfsServerIp()) {
to.setNfsServerIp(from.getNfsServerIp());
}
if (from.isSetProfileDetail()) {
to.setProfileDetails(new ProfileDetails());
to.getProfileDetails().getProfileDetails().addAll(adaptIn(from.getProfileDetail()));
}
return to;
}
use of org.ovirt.engine.api.model.ProfileDetails in project ovirt-engine by oVirt.
the class V3BrickProfileDetailInAdapter method adapt.
@Override
public BrickProfileDetail adapt(V3BrickProfileDetail from) {
BrickProfileDetail to = new BrickProfileDetail();
if (from.isSetBrick()) {
to.setBrick(adaptIn(from.getBrick()));
}
if (from.isSetProfileDetail()) {
to.setProfileDetails(new ProfileDetails());
to.getProfileDetails().getProfileDetails().addAll(adaptIn(from.getProfileDetail()));
}
return to;
}
Aggregations