Asaf Shakarchi has uploaded a new change for review. Change subject: core: Fixed error msg when adding a VM disk in diff pool. ......................................................................
core: Fixed error msg when adding a VM disk in diff pool. When creating a new disk for a VM, specifying a different pool causes the following error message: "Cannot add Virtual Machine Disk. The target Data Center does not contain the Virtual Machine Disk" Obviously the disk does not exist yet. This patch changes the message to: "Cannot add Virtual Machine Disk. The target Data Center does not contain the Virtual Machine" Change-Id: I1740658f448d5281b6b406346ae41487f48915ba Bug-Url: https://bugzilla.redhat.com/?????? Signed-off-by: Asaf Shakarchi <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/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, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/19/8319/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java index af5a8c8..e4dc97d 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java @@ -111,7 +111,7 @@ if (returnValue && vm != null && getStoragePoolIsoMapDao().get(new StoragePoolIsoMapId( getStorageDomainId().getValue(), vm.getstorage_pool_id())) == null) { returnValue = false; - addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_MATCH); + addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_OF_VM_NOT_MATCH); } returnValue = returnValue && checkImageConfiguration() diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java index 68b4812..23bb5da 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java @@ -127,6 +127,7 @@ ACTION_TYPE_FAILED_CANDIDATE_ALREADY_EXISTS, ACTION_TYPE_FAILED_ROLE_IS_READ_ONLY, ACTION_TYPE_FAILED_STORAGE_POOL_NOT_MATCH, + ACTION_TYPE_FAILED_STORAGE_POOL_OF_VM_NOT_MATCH, ACTION_TYPE_FAILED_MISSED_STORAGES_FOR_SOME_DISKS, ACTION_TYPE_FAILED_STOARGE_DOMAIN_IS_WRONG, ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_CONTAINS_DISK, 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 a296c6a..0bb896e 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -189,6 +189,7 @@ - Use the 'Force Override' option to override the existing file. ACTION_TYPE_FAILED_ROLE_IS_READ_ONLY=Cannot ${action} ${type}. The Role is Read-Only. ACTION_TYPE_FAILED_STORAGE_POOL_NOT_MATCH=Cannot ${action} ${type}. The target Data Center does not contain the ${type}. +ACTION_TYPE_FAILED_STORAGE_POOL_OF_VM_NOT_MATCH=Cannot ${action} ${type}. The target Data Center does not contain the Virtual Machine. ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_CONTAINS_DISK=Cannot ${action} ${type}. The Storage Domain already contains the target disk(s). ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST=Cannot ${action} ${type}. The Storage Domain name is already in use. ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST=Cannot ${action} ${type}. The Storage Domain already exists. 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 cabb810..f68d740 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 @@ -481,6 +481,9 @@ @DefaultStringValue("Cannot ${action} ${type}. The target Data Center does not contain the ${type}.") String ACTION_TYPE_FAILED_STORAGE_POOL_NOT_MATCH(); + @DefaultStringValue("Cannot ${action} ${type}. The target Data Center does not contain the Virtual Machines.") + String ACTION_TYPE_FAILED_STORAGE_POOL_OF_VM_NOT_MATCH(); + @DefaultStringValue("Cannot ${action} ${type}. The Storage Domain already contains the target disk(s).") String ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_CONTAINS_DISK(); 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 25a6f27..8c018e6 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 @@ -188,6 +188,7 @@ - Use the 'Force Override' option to override the existing file. ACTION_TYPE_FAILED_ROLE_IS_READ_ONLY=Cannot ${action} ${type}. The Role is Read-Only. ACTION_TYPE_FAILED_STORAGE_POOL_NOT_MATCH=Cannot ${action} ${type}. The target Data Center does not contain the ${type}. +ACTION_TYPE_FAILED_STORAGE_POOL_OF_VM_NOT_MATCH=Cannot ${action} ${type}. The target Data Center does not contain the Virtual Machine. ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_CONTAINS_DISK=Cannot ${action} ${type}. The Storage Domain already contains the target disk(s). ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST=Cannot ${action} ${type}. The Storage Domain name is already in use. ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST=Cannot ${action} ${type}. The Storage Domain already exists. 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 e76d978..04ecea4 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 @@ -186,6 +186,7 @@ - Use the 'Force Override' option to override the existing file. ACTION_TYPE_FAILED_ROLE_IS_READ_ONLY=Cannot ${action} ${type}. The Role is Read-Only. ACTION_TYPE_FAILED_STORAGE_POOL_NOT_MATCH=Cannot ${action} ${type}. The target Data Center does not contain the ${type}. +ACTION_TYPE_FAILED_STORAGE_POOL_OF_VM_NOT_MATCH=Cannot ${action} ${type}. The target Data Center does not contain the Virtual Machine. ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_CONTAINS_DISK=Cannot ${action} ${type}. The Storage Domain already contains the target disk(s). ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST=Cannot ${action} ${type}. The Storage Domain name is already in use. ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST=Cannot ${action} ${type}. The Storage Domain already exists. -- To view, visit http://gerrit.ovirt.org/8319 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1740658f448d5281b6b406346ae41487f48915ba Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Asaf Shakarchi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
