Daniel Erez has uploaded a new change for review.

Change subject: core: StoragePoolValidator - checkStoragePoolNotInStatus
......................................................................

core: StoragePoolValidator - checkStoragePoolNotInStatus

StoragePoolValidator -> checkStoragePoolNotInStatus:
validate that the storage pool is in the specified status.

Change-Id: I73034eb6e0e12426a5e4713c5bf8207bdb0ddad1
Bug-Url: https://bugzilla.redhat.com/1185826
Signed-off-by: Daniel Erez <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StoragePoolValidator.java
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/01/38901/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StoragePoolValidator.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StoragePoolValidator.java
index e24fb52..810532e 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StoragePoolValidator.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StoragePoolValidator.java
@@ -71,4 +71,11 @@
 
         return ValidationResult.VALID;
     }
+
+    public ValidationResult checkStoragePoolNotInStatus(StoragePoolStatus 
status) {
+        if (storagePool.getStatus() != status) {
+            return new 
ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL);
+        }
+        return ValidationResult.VALID;
+    }
 }


-- 
To view, visit https://gerrit.ovirt.org/38901
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73034eb6e0e12426a5e4713c5bf8207bdb0ddad1
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to