use of org.ovirt.engine.api.model.DiskSnapshot in project ovirt-engine by oVirt.
the class DiskSnapshotMapper method map.
@Mapping(from = org.ovirt.engine.core.common.businessentities.storage.Disk.class, to = DiskSnapshot.class)
public static DiskSnapshot map(org.ovirt.engine.core.common.businessentities.storage.Disk entity, DiskSnapshot template) {
if (template == null) {
template = new DiskSnapshot();
}
DiskSnapshot model = (DiskSnapshot) DiskMapper.map(entity, template);
Disk disk = new Disk();
disk.setId(entity.getId().toString());
model.setDisk(disk);
DiskImage diskImage = (DiskImage) entity;
model.setId(diskImage.getImageId().toString());
model.setImageId(null);
return model;
}
Aggregations