static org.ovirt.engine.core.common.businessentities.storage.Disk setUpEntityExpectations(DiskImage entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getVmSnapshotId()).thenReturn(GUIDS[2]); when(entity.getVolumeFormat()).thenReturn(VolumeFormat.RAW); when(entity.getImageStatus()).thenReturn(ImageStatus.OK); when(entity.getVolumeType()).thenReturn(VolumeType.Sparse); when(entity.isShareable()).thenReturn(false); when(entity.getPropagateErrors()).thenReturn(PropagateErrors.On); when(entity.getDiskStorageType()).thenReturn(DiskStorageType.IMAGE); when(entity.getImageId()).thenReturn(GUIDS[1]); ArrayList<Guid> sdIds = new ArrayList<>(); sdIds.add(Guid.Empty); when(entity.getStorageIds()).thenReturn(sdIds); return setUpStatisticalEntityExpectations(entity); }
private org.ovirt.engine.core.common.businessentities.storage.Disk setUpEntityExpectations(DiskImage entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getVmSnapshotId()).thenReturn(GUIDS[2]); when(entity.getVolumeFormat()).thenReturn(VolumeFormat.RAW); when(entity.getImageStatus()).thenReturn(ImageStatus.OK); when(entity.getVolumeType()).thenReturn(VolumeType.Sparse); when(entity.isShareable()).thenReturn(false); when(entity.getPropagateErrors()).thenReturn(PropagateErrors.On); when(entity.getDiskStorageType()).thenReturn(DiskStorageType.IMAGE); when(entity.getImageId()).thenReturn(GUIDS[1]); ArrayList<Guid> sdIds = new ArrayList<>(); sdIds.add(Guid.Empty); when(entity.getStorageIds()).thenReturn(sdIds); return setUpStatisticalEntityExpectations(entity); }
private org.ovirt.engine.core.common.businessentities.storage.Disk setUpEntityExpectations(DiskImage entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getVmSnapshotId()).thenReturn(GUIDS[2]); when(entity.getVolumeFormat()).thenReturn(VolumeFormat.RAW); when(entity.getImageStatus()).thenReturn(ImageStatus.OK); when(entity.getVolumeType()).thenReturn(VolumeType.Sparse); when(entity.isShareable()).thenReturn(false); when(entity.getPropagateErrors()).thenReturn(PropagateErrors.On); when(entity.getDiskStorageType()).thenReturn(DiskStorageType.IMAGE); when(entity.getImageId()).thenReturn(GUIDS[1]); ArrayList<Guid> sdIds = new ArrayList<>(); sdIds.add(Guid.Empty); when(entity.getStorageIds()).thenReturn(sdIds); return setUpStatisticalEntityExpectations(entity); }
static org.ovirt.engine.core.common.businessentities.storage.Disk setUpEntityExpectations(DiskImage entity, int index) { when(entity.getId()).thenReturn(GUIDS[index]); when(entity.getVmSnapshotId()).thenReturn(GUIDS[2]); when(entity.getVolumeFormat()).thenReturn(VolumeFormat.RAW); when(entity.getImageStatus()).thenReturn(ImageStatus.OK); when(entity.getVolumeType()).thenReturn(VolumeType.Sparse); when(entity.isShareable()).thenReturn(false); when(entity.getPropagateErrors()).thenReturn(PropagateErrors.On); when(entity.getDiskStorageType()).thenReturn(DiskStorageType.IMAGE); when(entity.getImageId()).thenReturn(GUIDS[1]); ArrayList<Guid> sdIds = new ArrayList<>(); sdIds.add(Guid.Empty); when(entity.getStorageIds()).thenReturn(sdIds); return setUpStatisticalEntityExpectations(entity); }
di.setNumberOfVms(diskImage.getNumberOfVms()); di.setWipeAfterDelete(diskImage.isWipeAfterDelete()); di.setPropagateErrors(diskImage.getPropagateErrors()); di.setDiskAlias(diskImage.getDiskAlias()); di.setDiskDescription(diskImage.getDiskDescription());