use of org.ovirt.engine.api.model.NfsProfileDetail 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.NfsProfileDetail 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