Amit Aviram has uploaded a new change for review. Change subject: core: AddStorageDomainCommand CDA addition ......................................................................
core: AddStorageDomainCommand CDA addition Block domains does not support export type. Thus a validation was added in AddStorageDomainCommand CDA. Change-Id: I80f68c866e583152b80780554f5529eb720e0759 Bug-Url: https://bugzilla.redhat.com/1065989 Signed-off-by: Amit Aviram <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 6 files changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/93/36393/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java index b3aa5af..5717a95 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java @@ -160,8 +160,8 @@ return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); } if (getStorageDomain().getStorageDomainType() == StorageDomainType.ImportExport - && getStorageDomain().getStorageType() == StorageType.LOCALFS) { - return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); + && (getStorageDomain().getStorageType() == StorageType.LOCALFS || getStorageDomain().getStorageType().isBlockDomain())) { + return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_EXPORT_DOMAIN_CANNOT_BE_APPLIED_ON_BLOCK_STORAGE); } if (getStorageDomain().getStorageDomainType() == StorageDomainType.Master) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java index 478b0d8..02a742f 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java @@ -615,6 +615,7 @@ ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED(ErrorType.CONFLICT), ACTION_TYPE_FAILED_NO_VDS_IN_POOL(ErrorType.CONFLICT), ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL(ErrorType.BAD_PARAMETERS), + ACTION_TYPE_FAILED_EXPORT_DOMAIN_CANNOT_BE_APPLIED_ON_BLOCK_STORAGE(ErrorType.BAD_PARAMETERS), ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL(ErrorType.CONFLICT), ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST(ErrorType.CONFLICT), ACTION_TYPE_FAILED_MASTER_STORAGE_DOMAIN_NOT_ACTIVE(ErrorType.CONFLICT), diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties index cd6beda..3c17ca1 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -557,6 +557,7 @@ EN_ALREADY_SUBSCRIBED=User is already subscribed to this event with the same Notification method. EN_NOT_SUBSCRIBED=Cannot ${action} ${type}.User is not subscribed to this event with the given Notification method. ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL=Cannot ${action} ${type}. Storage Domain type not specified. +ACTION_TYPE_FAILED_EXPORT_DOMAIN_CANNOT_BE_APPLIED_ON_BLOCK_STORAGE=Cannot ${action} ${type}. Export domain cannot be applied on block storage. ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL=Cannot ${action} ${type}. Storage Domain format ${storageFormat} is illegal. ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST=Cannot ${action} ${type}. Storage format ${storageFormat} is not supported on the selected host version. ERROR_CANNOT_EXTEND_NON_DATA_DOMAIN=Cannot extend Storage Domain. Extend operation is supported only on Data Storage Domain. diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java index 030a43c..af81e05 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java @@ -1543,6 +1543,9 @@ @DefaultStringValue("Cannot ${action} ${type}. Storage Domain type not specified.") String ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL(); + @DefaultStringValue("Cannot ${action} ${type}. Export domain cannot be applied on block storage.") + String ACTION_TYPE_FAILED_EXPORT_DOMAIN_CANNOT_BE_APPLIED_ON_BLOCK_STORAGE(); + @DefaultStringValue("Cannot ${action} ${type}. Storage Domain format ${storageFormat} is illegal.") String ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL(); diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index b27d383..802afe1 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -518,6 +518,7 @@ EN_ALREADY_SUBSCRIBED=User is already subscribed to this event with the same Notification method. EN_NOT_SUBSCRIBED=Cannot ${action} ${type}.User is not subscribed to this event with the given Notification method. ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL=Cannot ${action} ${type}. Storage Domain type not specified. +ACTION_TYPE_FAILED_EXPORT_DOMAIN_CANNOT_BE_APPLIED_ON_BLOCK_STORAGE=Cannot ${action} ${type}. Export domain cannot be applied on block storage. ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL=Cannot ${action} ${type}. Storage Domain format ${storageFormat} is illegal. ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST=Cannot ${action} ${type}. Storage format ${storageFormat} is not supported on the selected host version. ERROR_CANNOT_EXTEND_NON_DATA_DOMAIN=Cannot extend Storage Domain. Extend operation is supported only on Data Storage Domain. diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index a7cbbcf..f233d96 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -561,6 +561,7 @@ EN_ALREADY_SUBSCRIBED=User is already subscribed to this event with the same Notification method. EN_NOT_SUBSCRIBED=Cannot ${action} ${type}.User is not subscribed to this event with the given Notification method. ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL=Cannot ${action} ${type}. Storage Domain type not specified. +ACTION_TYPE_FAILED_EXPORT_DOMAIN_CANNOT_BE_APPLIED_ON_BLOCK_STORAGE=Cannot ${action} ${type}. Export domain cannot be applied on block storage. ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL=Cannot ${action} ${type}. Storage Domain format ${storageFormat} is illegal. ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST=Cannot ${action} ${type}. Storage format ${storageFormat} is not supported on the selected host version. ERROR_CANNOT_EXTEND_NON_DATA_DOMAIN=Cannot extend Storage Domain. Extend operation is supported only on Data Storage Domain. -- To view, visit http://gerrit.ovirt.org/36393 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80f68c866e583152b80780554f5529eb720e0759 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Amit Aviram <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
