protected org.ovirt.engine.core.common.businessentities.storage.Disk getEntity(int index, boolean noSD) { DiskImage entity = new DiskImage(); entity.setId(GUIDS[index]); entity.setVolumeFormat(VolumeFormat.RAW); entity.setImageStatus(ImageStatus.OK); entity.setVolumeType(VolumeType.Sparse); entity.setShareable(false); entity.setPropagateErrors(PropagateErrors.On); ArrayList<Guid> storages = new ArrayList<>(); if (!noSD) { storages.addAll(Arrays.asList(GUIDS)); } entity.setStorageIds(storages); return setUpStatisticalEntityExpectations(entity); } static org.ovirt.engine.core.common.businessentities.storage.Disk setUpStatisticalEntityExpectations(DiskImage entity) {
@Override protected org.ovirt.engine.core.common.businessentities.storage.Disk getEntity(int index) { DiskImage entity = new DiskImage(); entity.setId(GUIDS[index]); entity.setImageId(GUIDS[1]); entity.setVolumeFormat(VolumeFormat.RAW); entity.setImageStatus(ImageStatus.OK); entity.setVolumeType(VolumeType.Sparse); entity.setShareable(false); entity.setPropagateErrors(PropagateErrors.On); ArrayList<Guid> sdIds = new ArrayList<>(); sdIds.add(Guid.Empty); entity.setStorageIds(sdIds); return setUpStatisticalEntityExpectations(entity); }
di.setNumberOfVms(diskImage.getNumberOfVms()); di.setWipeAfterDelete(diskImage.isWipeAfterDelete()); di.setPropagateErrors(diskImage.getPropagateErrors()); di.setDiskAlias(diskImage.getDiskAlias()); di.setDiskDescription(diskImage.getDiskDescription());
@Override protected org.ovirt.engine.core.common.businessentities.storage.Disk getEntity(int index) { DiskImage entity = new DiskImage(); entity.setId(GUIDS[index]); entity.setVolumeFormat(VolumeFormat.RAW); entity.setImageStatus(ImageStatus.OK); entity.setVolumeType(VolumeType.Sparse); entity.setShareable(false); entity.setPropagateErrors(PropagateErrors.On); return setUpStatisticalEntityExpectations(entity); }
@Override protected org.ovirt.engine.core.common.businessentities.storage.Disk getEntity(int index) { DiskImage entity = new DiskImage(); entity.setId(GUIDS[index]); entity.setVolumeFormat(VolumeFormat.RAW); entity.setImageStatus(ImageStatus.OK); entity.setVolumeType(VolumeType.Sparse); entity.setShareable(false); entity.setPropagateErrors(PropagateErrors.On); return setUpStatisticalEntityExpectations(entity); }
@Override protected org.ovirt.engine.core.common.businessentities.storage.Disk getEntity(int index) { DiskImage entity = new DiskImage(); entity.setId(GUIDS[index]); entity.setVolumeFormat(VolumeFormat.RAW); entity.setImageStatus(ImageStatus.OK); entity.setVolumeType(VolumeType.Sparse); entity.setShareable(false); entity.setPropagateErrors(PropagateErrors.On); return setUpStatisticalEntityExpectations(entity); }