Amit Aviram has uploaded a new change for review.

Change subject: core: Functions and comments ordering in domain to pool 
relation validator.
......................................................................

core: Functions and comments ordering in domain to pool relation validator.

Some function names and comments in StorageDomainToPoolRelationValidator were
changed to describe what the functions actually do.

Change-Id: I986ca1112de223af800e8a91b99c531e8aabd88e
Signed-off-by: Amit Aviram <aavi...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StorageDomainToPoolRelationValidator.java
1 file changed, 5 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/37316/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StorageDomainToPoolRelationValidator.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StorageDomainToPoolRelationValidator.java
index ef110f3..4a7f3dd 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StorageDomainToPoolRelationValidator.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StorageDomainToPoolRelationValidator.java
@@ -43,7 +43,7 @@
         return 
storageDomainStatic.getStorageDomainType().isIsoOrImportExportDomain();
     }
 
-    public ValidationResult isStorageDomainCompatibleWithDC() {
+    public ValidationResult isStorageDomainTypeSupportedInPool() {
         if (storageDomainStatic.getStorageType() == StorageType.GLUSTERFS) {
             return isGlusterSupportedInDC();
         }
@@ -123,9 +123,7 @@
     }
 
     /**
-     * The following method should check if the format of the storage domain 
allows to it to be attached to the storage
-     * pool. At case of failure the false value will be return and appropriate 
error message will be added to
-     * canDoActionMessages
+     * The following method checks if the format of the storage domain allows 
it to be attached to the storage pool.
      */
     public ValidationResult isStorageDomainFormatCorrectForDC() {
         if (isStorageDomainOfTypeIsoOrExport()) {
@@ -135,7 +133,6 @@
         if (storagePool != null) {
             if 
(VersionStorageFormatUtil.getPreferredForVersion(storagePool.getCompatibilityVersion(),
                     
storageDomainStatic.getStorageType()).compareTo(storageDomainStatic.getStorageFormat())
 < 0) {
-
                 return new 
ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL,
 String.format("$storageFormat %1$s", storageDomainStatic
                         .getStorageFormat().toString()));
             }
@@ -150,7 +147,7 @@
         return ValidationResult.VALID;
     }
 
-    public ValidationResult isStorageDomainTypeFitsDC() {
+    public ValidationResult isStorageDomainTypeFitsPoolIfMixed() {
         boolean isBlockDomain = 
storageDomainStatic.getStorageType().isBlockDomain();
 
         if (!isMixedTypesAllowedInDC()) {
@@ -199,7 +196,7 @@
             if (!(valResult = isStorageDomainLocalityFitsDC()).isValid()) {
                 return valResult;
             }
-            if (!(valResult = isStorageDomainTypeFitsDC()).isValid()) {
+            if (!(valResult = isStorageDomainTypeFitsPoolIfMixed()).isValid()) 
{
                 return valResult;
             }
         } else {
@@ -207,7 +204,7 @@
                 return valResult;
             }
         }
-        if (!(valResult = isStorageDomainCompatibleWithDC()).isValid()) {
+        if (!(valResult = isStorageDomainTypeSupportedInPool()).isValid()) {
             return valResult;
         }
         return ValidationResult.VALID;


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I986ca1112de223af800e8a91b99c531e8aabd88e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <aavi...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to