Allon Mureinik has uploaded a new change for review. Change subject: core: ExtendSANStorageDomain storage type check ......................................................................
core: ExtendSANStorageDomain storage type check ExtendSANStorageDomainCommand should only be applied on block storage domains. The current canDoAction() is wrong, as it theoritically[1] allows the command to be run on POSIX, Gluster and LocalFS storage domains. [1] Note: With the current code base this patch has no functional gain, as this condition is checked in every flow that can potentially call this command (both GUI and REST), but it is the correct thing to do, and may serve to prevent future bugs if this command is ever called from a different flow. Change-Id: If25b65ba482a1659d5083f06dd76fa42c68e971e Bug-Url: https://bugzilla.redhat.com/1213969 Signed-off-by: Allon Mureinik <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ExtendSANStorageDomainCommand.java 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/96/40496/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ExtendSANStorageDomainCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ExtendSANStorageDomainCommand.java index c6fb88a..05601a9 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ExtendSANStorageDomainCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ExtendSANStorageDomainCommand.java @@ -9,7 +9,6 @@ import org.ovirt.engine.core.common.action.VdcActionType; import org.ovirt.engine.core.common.businessentities.StorageDomainStatus; import org.ovirt.engine.core.common.businessentities.storage.LUNs; -import org.ovirt.engine.core.common.businessentities.storage.StorageType; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.common.errors.VdcBllMessages; @@ -78,7 +77,7 @@ return false; } - if ((getStorageDomain().getStorageType() == StorageType.NFS || getStorageDomain().getStorageType() == StorageType.UNKNOWN)) { + if (!getStorageDomain().getStorageType().isBlockDomain()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); return false; } -- To view, visit https://gerrit.ovirt.org/40496 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If25b65ba482a1659d5083f06dd76fa42c68e971e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
