Search in sources :

Example 1 with EntityProfileDetail

use of org.ovirt.engine.api.model.EntityProfileDetail 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;
}
Also used : V3EntityProfileDetail(org.ovirt.engine.api.v3.types.V3EntityProfileDetail) EntityProfileDetail(org.ovirt.engine.api.model.EntityProfileDetail) ProfileDetails(org.ovirt.engine.api.model.ProfileDetails)

Example 2 with EntityProfileDetail

use of org.ovirt.engine.api.model.EntityProfileDetail 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);
    }
}
Also used : StatsInfo(org.ovirt.engine.core.common.businessentities.gluster.StatsInfo) BrickProfileDetail(org.ovirt.engine.api.model.BrickProfileDetail) NfsProfileDetail(org.ovirt.engine.api.model.NfsProfileDetail) ProfileDetail(org.ovirt.engine.api.model.ProfileDetail) EntityProfileDetail(org.ovirt.engine.api.model.EntityProfileDetail) BlockStatistics(org.ovirt.engine.api.model.BlockStatistics) Statistics(org.ovirt.engine.api.model.Statistics) FopStatistics(org.ovirt.engine.api.model.FopStatistics) BrickProfileDetails(org.ovirt.engine.api.model.BrickProfileDetails) GlusterVolumeProfileDetails(org.ovirt.engine.api.model.GlusterVolumeProfileDetails) NfsProfileDetails(org.ovirt.engine.api.model.NfsProfileDetails) ProfileDetails(org.ovirt.engine.api.model.ProfileDetails)

Aggregations

EntityProfileDetail (org.ovirt.engine.api.model.EntityProfileDetail)2 ProfileDetails (org.ovirt.engine.api.model.ProfileDetails)2 BlockStatistics (org.ovirt.engine.api.model.BlockStatistics)1 BrickProfileDetail (org.ovirt.engine.api.model.BrickProfileDetail)1 BrickProfileDetails (org.ovirt.engine.api.model.BrickProfileDetails)1 FopStatistics (org.ovirt.engine.api.model.FopStatistics)1 GlusterVolumeProfileDetails (org.ovirt.engine.api.model.GlusterVolumeProfileDetails)1 NfsProfileDetail (org.ovirt.engine.api.model.NfsProfileDetail)1 NfsProfileDetails (org.ovirt.engine.api.model.NfsProfileDetails)1 ProfileDetail (org.ovirt.engine.api.model.ProfileDetail)1 Statistics (org.ovirt.engine.api.model.Statistics)1 V3EntityProfileDetail (org.ovirt.engine.api.v3.types.V3EntityProfileDetail)1 StatsInfo (org.ovirt.engine.core.common.businessentities.gluster.StatsInfo)1