use of org.ovirt.engine.api.model.BrickProfileDetail 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;
}
use of org.ovirt.engine.api.model.BrickProfileDetail in project ovirt-engine by oVirt.
the class GlusterVolumeProfileInfoMapper method map.
@Mapping(from = GlusterVolumeProfileInfo.class, to = GlusterVolumeProfileDetails.class)
public static GlusterVolumeProfileDetails map(GlusterVolumeProfileInfo fromEntity, GlusterVolumeProfileDetails toModel) {
GlusterVolumeProfileDetails model = new GlusterVolumeProfileDetails();
BrickProfileDetails brickprofileDetails = new BrickProfileDetails();
if (fromEntity.getBrickProfileDetails() != null) {
for (org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails brickDetailEntity : fromEntity.getBrickProfileDetails()) {
BrickProfileDetail brickprofileDetail = new BrickProfileDetail();
brickprofileDetail.setBrick(new GlusterBrick());
brickprofileDetail.getBrick().setBrickDir(brickDetailEntity.getName());
mapProfileDetails(brickDetailEntity.getProfileStats(), brickprofileDetail);
brickprofileDetails.getBrickProfileDetails().add(brickprofileDetail);
}
}
model.setBrickProfileDetails(brickprofileDetails);
NfsProfileDetails nfsprofileDetails = new NfsProfileDetails();
if (fromEntity.getNfsProfileDetails() != null) {
for (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileStats nfsDetailEntity : fromEntity.getNfsProfileDetails()) {
NfsProfileDetail nfsprofileDetail = new NfsProfileDetail();
nfsprofileDetail.setNfsServerIp(nfsDetailEntity.getName());
mapProfileDetails(nfsDetailEntity.getProfileStats(), nfsprofileDetail);
nfsprofileDetails.getNfsProfileDetails().add(nfsprofileDetail);
}
}
model.setNfsProfileDetails(nfsprofileDetails);
return model;
}
Aggregations