Allon Mureinik has posted comments on this change.

Change subject: core: Storage validator packaging.
......................................................................


Patch Set 2: Code-Review-1

(22 comments)

Amit - see inline comment.

Gilad - please take a look at the storage QoS validatiors - do you want them 
under storage, or do you have a qos package for them?

http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java:

Line 11: import org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter;
Line 12: import 
org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter;
Line 13: import org.ovirt.engine.core.bll.quota.QuotaStorageDependent;
Line 14: import org.ovirt.engine.core.bll.storage.StorageDomainCommandBase;
Line 15: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 16: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 17: import org.ovirt.engine.core.bll.utils.VmDeviceUtils;
Line 18: import org.ovirt.engine.core.bll.utils.WipeAfterDeleteUtils;
Line 19: import org.ovirt.engine.core.bll.validator.storage.DiskValidator;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java:

Line 6: import java.util.Map;
Line 7: import java.util.Set;
Line 8: 
Line 9: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
Line 10: import 
org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator;
please organize the imports
Line 11: import org.ovirt.engine.core.common.AuditLogType;
Line 12: import org.ovirt.engine.core.common.action.AddVmParameters;
Line 13: import 
org.ovirt.engine.core.common.action.CreateCloneOfTemplateParameters;
Line 14: import org.ovirt.engine.core.common.action.LockProperties;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java:

Line 20: import 
org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter;
Line 21: import org.ovirt.engine.core.bll.quota.QuotaStorageDependent;
Line 22: import org.ovirt.engine.core.bll.quota.QuotaVdsDependent;
Line 23: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 24: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 25: import org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil;
Line 26: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 27: import org.ovirt.engine.core.bll.utils.VmDeviceUtils;
Line 28: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java:

Line 18: import org.ovirt.engine.core.bll.quota.QuotaStorageDependent;
Line 19: import org.ovirt.engine.core.bll.snapshots.SnapshotsManager;
Line 20: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 21: import org.ovirt.engine.core.bll.validator.LiveSnapshotValidator;
Line 22: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 23: import org.ovirt.engine.core.bll.tasks.TaskHandlerCommand;
Line 24: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
Line 25: import 
org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator;
Line 26: import org.ovirt.engine.core.bll.validator.VmValidator;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmCommand.java:

Line 11: import org.apache.commons.lang.StringUtils;
Line 12: import org.ovirt.engine.core.bll.context.EngineContext;
Line 13: import org.ovirt.engine.core.bll.memory.MemoryUtils;
Line 14: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 15: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 16: import org.ovirt.engine.core.bll.utils.ClusterUtils;
Line 17: import org.ovirt.engine.core.bll.utils.VmDeviceUtils;
Line 18: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
Line 19: import 
org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java:

Line 4: import java.util.HashMap;
Line 5: import java.util.List;
Line 6: import java.util.Map;
Line 7: 
Line 8: import 
org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator;
please organize the imports
Line 9: import org.ovirt.engine.core.common.AuditLogType;
Line 10: import org.ovirt.engine.core.common.VdcObjectType;
Line 11: import org.ovirt.engine.core.common.action.LockProperties;
Line 12: import org.ovirt.engine.core.common.action.LockProperties.Scope;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ForceSelectSPMCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ForceSelectSPMCommand.java:

Line 3: import java.util.ArrayList;
Line 4: import java.util.List;
Line 5: import java.util.Map;
Line 6: 
Line 7: import org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports
Line 8: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 9: import org.ovirt.engine.core.common.AuditLogType;
Line 10: import org.ovirt.engine.core.common.VdcObjectType;
Line 11: import org.ovirt.engine.core.common.action.ForceSelectSPMParameters;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetDiskAlignmentCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetDiskAlignmentCommand.java:

Line 6: import java.util.Date;
Line 7: import java.util.List;
Line 8: import java.util.Map;
Line 9: 
Line 10: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 11: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 12: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
Line 13: import org.ovirt.engine.core.common.AuditLogType;
Line 14: import org.ovirt.engine.core.common.action.GetDiskAlignmentParameters;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportRepoImageCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportRepoImageCommand.java:

Line 10: import 
org.ovirt.engine.core.bll.provider.storage.OpenStackImageProviderProxy;
Line 11: import org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter;
Line 12: import 
org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter;
Line 13: import org.ovirt.engine.core.bll.quota.QuotaStorageDependent;
Line 14: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 15: import org.ovirt.engine.core.bll.tasks.SPMAsyncTaskHandler;
Line 16: import org.ovirt.engine.core.bll.tasks.TaskHandlerCommand;
Line 17: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 18: import 
org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java:

Line 24: import org.ovirt.engine.core.bll.snapshots.SnapshotsManager;
Line 25: import org.ovirt.engine.core.bll.tasks.TaskHandlerCommand;
Line 26: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 27: import org.ovirt.engine.core.bll.utils.VmDeviceUtils;
Line 28: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 29: import org.ovirt.engine.core.bll.validator.ImportValidator;
Line 30: import 
org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator;
Line 31: import org.ovirt.engine.core.common.AuditLogType;
Line 32: import org.ovirt.engine.core.common.FeatureSupported;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveVmCommand.java:

Line 5: import java.util.Map;
Line 6: 
Line 7: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 8: import org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
Line 9: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
please organize the imports
Line 10: import org.ovirt.engine.core.bll.validator.VmValidator;
Line 11: import org.ovirt.engine.core.common.AuditLogType;
Line 12: import org.ovirt.engine.core.common.VdcObjectType;
Line 13: import org.ovirt.engine.core.common.action.MoveVmParameters;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java:

Line 11: import org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter;
Line 12: import 
org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter;
Line 13: import org.ovirt.engine.core.bll.quota.QuotaStorageDependent;
Line 14: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 15: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 16: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 17: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
Line 18: import org.ovirt.engine.core.bll.validator.storage.DiskValidator;
Line 19: import 
org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskSnapshotsCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskSnapshotsCommand.java:

Line 9: 
Line 10: import org.apache.commons.lang.StringUtils;
Line 11: import org.ovirt.engine.core.bll.context.CommandContext;
Line 12: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 13: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 14: import org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil;
Line 15: import org.ovirt.engine.core.bll.tasks.SPMAsyncTaskHandler;
Line 16: import org.ovirt.engine.core.bll.tasks.TaskHandlerCommand;
Line 17: import org.ovirt.engine.core.bll.tasks.interfaces.CommandCallBack;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java:

Line 10: import org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter;
Line 11: import org.ovirt.engine.core.bll.quota.QuotaManager;
Line 12: import org.ovirt.engine.core.bll.quota.QuotaStorageDependent;
Line 13: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 14: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 15: import org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil;
Line 16: import org.ovirt.engine.core.bll.tasks.interfaces.CommandCallBack;
Line 17: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
Line 18: import 
org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java:

Line 15: import org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter;
Line 16: import 
org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter;
Line 17: import org.ovirt.engine.core.bll.quota.QuotaStorageDependent;
Line 18: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 19: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 20: import org.ovirt.engine.core.bll.tasks.TaskHandlerCommand;
Line 21: import org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil;
Line 22: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 23: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreAllSnapshotsCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestoreAllSnapshotsCommand.java:

Line 13: import 
org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter;
Line 14: import org.ovirt.engine.core.bll.quota.QuotaStorageDependent;
Line 15: import org.ovirt.engine.core.bll.snapshots.SnapshotsManager;
Line 16: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 17: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 18: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 19: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
Line 20: import 
org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator;
Line 21: import org.ovirt.engine.core.bll.validator.VmValidator;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java:

Line 15: import 
org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter;
Line 16: import org.ovirt.engine.core.bll.quota.QuotaStorageDependent;
Line 17: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 18: import org.ovirt.engine.core.bll.utils.VmDeviceUtils;
Line 19: import org.ovirt.engine.core.bll.validator.storage.DiskValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 20: import org.ovirt.engine.core.bll.validator.LocalizedVmStatus;
Line 21: import 
org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator;
Line 22: import org.ovirt.engine.core.common.AuditLogType;
Line 23: import org.ovirt.engine.core.common.VdcActionUtils;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java:

Line 7: import java.util.List;
Line 8: 
Line 9: import org.ovirt.engine.core.bll.context.CommandContext;
Line 10: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 11: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 12: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 13: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
Line 14: import org.ovirt.engine.core.bll.validator.RunVmValidator;
Line 15: import 
org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator;


Line 9: import org.ovirt.engine.core.bll.context.CommandContext;
Line 10: import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator;
Line 11: import 
org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator;
Line 12: import org.ovirt.engine.core.bll.utils.PermissionSubject;
Line 13: import org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator;
please organize the imports so all the 
org.ovirt.engine.core.bll.validator.storage are together.
Line 14: import org.ovirt.engine.core.bll.validator.RunVmValidator;
Line 15: import 
org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator;
Line 16: import org.ovirt.engine.core.bll.validator.VmValidator;
Line 17: import org.ovirt.engine.core.common.VdcObjectType;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommandTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommandTest.java:

Line 71:     private VdsDAO vdsDao;
Line 72:     @Mock
Line 73:     private NetworkDao networkDao;
Line 74:     @Mock
Line 75:     private DbFacade dbFacade;
Why do you need this? It is referenced anywhere in the test.
Line 76: 
Line 77:     @Before
Line 78:     public void setUp() {
Line 79:         
when(spDao.get(any(Guid.class))).thenReturn(createDefaultStoragePool());


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/StorageDomainValidatorTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/StorageDomainValidatorTest.java:

Line 6: 
Line 7: import org.junit.Before;
Line 8: import org.junit.ClassRule;
Line 9: import org.junit.Test;
Line 10: import 
org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator;
No - this class should also be moved to 
org.ovirt.engine.core.bll.validator.storage
Line 11: import org.ovirt.engine.core.common.businessentities.StorageDomain;
Line 12: import 
org.ovirt.engine.core.common.businessentities.StorageDomainStatus;
Line 13: import org.ovirt.engine.core.common.businessentities.StorageType;
Line 14: import org.ovirt.engine.core.common.config.ConfigValues;


http://gerrit.ovirt.org/#/c/36286/2/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/MultipleStorageDomainsValidatorTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/MultipleStorageDomainsValidatorTest.java:

Line 33: import org.ovirt.engine.core.compat.Guid;
Line 34: import org.ovirt.engine.core.dao.StorageDomainDAO;
Line 35: import org.ovirt.engine.core.utils.MockConfigRule;
Line 36: 
Line 37: /** A test class for the {@link 
org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator} 
class. */
It's the same package, no need for FQCN.
Line 38: @RunWith(MockitoJUnitRunner.class)
Line 39: public class MultipleStorageDomainsValidatorTest {
Line 40: 
Line 41:     @ClassRule


-- 
To view, visit http://gerrit.ovirt.org/36286
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iacc2a20be1ba12864b5d567d902f9245a05c374f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Amit Aviram <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to