Omer Frenkel has uploaded a new change for review. Change subject: core: better message on import template version ......................................................................
core: better message on import template version when trying to add a template version, which its base template is missing, the message you get is not clear. in this patch a better message provided. Change-Id: I9fbf2c45c03fe9838bf25be5529c93c322372b28 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1073035 Signed-off-by: Omer Frenkel <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.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, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/99/25999/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java index 8d9bc0f..abc5c23 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java @@ -206,7 +206,7 @@ VmTemplate baseTemplate = getVmTemplateDAO().get(getVmTemplate().getBaseTemplateId()); if (baseTemplate == null) { retVal = false; - addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_DOES_NOT_EXIST); + addCanDoActionMessage(VdcBllMessages.VMT_CANNOT_IMPORT_TEMPLATE_VERSION_MISSING_BASE); } } if (!retVal) { 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 c4b06be..a41ed52 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 @@ -390,6 +390,7 @@ VMT_CANNOT_CREATE_DUPLICATE_NAME(ErrorType.CONFLICT), VMT_CLUSTER_IS_NOT_VALID(ErrorType.BAD_PARAMETERS), VMT_CANNOT_IMPORT_TEMPLATE_EXISTS(ErrorType.CONFLICT), + VMT_CANNOT_IMPORT_TEMPLATE_VERSION_MISSING_BASE(ErrorType.BAD_PARAMETERS), VMT_CANNOT_REMOVE_DOMAINS_LIST_MISMATCH(ErrorType.CONFLICT), VM_CANNOT_IMPORT_TEMPLATE_NAME_EXISTS(ErrorType.CONFLICT), ACTION_TYPE_FAILED_NETWORK_INTERFACE_MAC_INVALID(ErrorType.BAD_PARAMETERS), 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 1b7bb37..a9aec15 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -679,6 +679,7 @@ ACTION_TYPE_FAILED_MAX_NUM_CPU=Cannot ${action} ${type}. Max number of cpu exceeded ACTION_TYPE_FAILED_MAX_NUM_SOCKETS=Cannot ${action} ${type}. Max number of sockets exceeded VMT_CANNOT_IMPORT_TEMPLATE_EXISTS=Import Template failed - Template Id already exist in the system. Please remove the Template (${TemplateName}) from the system first +VMT_CANNOT_IMPORT_TEMPLATE_VERSION_MISSING_BASE=Cannot import Template Version, Base Template for this Version is missing, please first Import Baste Template, or Import Version as Base Template using Clone. VM_CANNOT_IMPORT_TEMPLATE_NAME_EXISTS=Import Template failed - Template Name already exist in the system. Please rename the Template in the system first VM_CANNOT_IMPORT_VM_EXISTS=Import VM failed - VM Id already exist in the system. Please remove the VM (${VmName}) from the system first VM_CANNOT_IMPORT_VM_NAME_EXISTS=Import VM failed - VM Name already exist in the system. Please rename the VM in the system first 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 8d14500..012b8e4 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 @@ -1849,6 +1849,9 @@ @DefaultStringValue("Import Template failed - Template Id already exist in the system. Please remove the Template (${TemplateName}) from the system first") String VMT_CANNOT_IMPORT_TEMPLATE_EXISTS(); + @DefaultStringValue("Cannot import Template Version, Base Template for this Version is missing, please first Import Baste Template, or Import Version as Base Template using Clone.") + String VMT_CANNOT_IMPORT_TEMPLATE_VERSION_MISSING_BASE(); + @DefaultStringValue("Import Template failed - Template Name already exist in the system. Please rename the Template in the system first") String VM_CANNOT_IMPORT_TEMPLATE_NAME_EXISTS(); 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 0c27988..da311f6 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 @@ -659,6 +659,7 @@ ACTION_TYPE_FAILED_MAX_NUM_CPU=Cannot ${action} ${type}. Max number of cpu exceeded ACTION_TYPE_FAILED_MAX_NUM_SOCKETS=Cannot ${action} ${type}. Max number of sockets exceeded VMT_CANNOT_IMPORT_TEMPLATE_EXISTS=Import Template failed - Template Id already exist in the system. Please remove the Template (${TemplateName}) from the system first +VMT_CANNOT_IMPORT_TEMPLATE_VERSION_MISSING_BASE=Cannot import Template Version, Base Template for this Version is missing, please first Import Baste Template, or Import Version as Base Template using Clone. VM_CANNOT_IMPORT_TEMPLATE_NAME_EXISTS=Import Template failed - Template Name already exist in the system. Please rename the Template in the system first VM_CANNOT_IMPORT_VM_EXISTS=Import VM failed - VM Id already exist in the system. Please remove the VM (${VmName}) from the system first VM_CANNOT_IMPORT_VM_NAME_EXISTS=Import VM failed - VM Name already exist in the system. Please rename the VM in the system first 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 cb3c16f..e5e8b8b 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 @@ -680,6 +680,7 @@ ACTION_TYPE_FAILED_MAX_NUM_CPU=Cannot ${action} ${type}. Max number of cpu exceeded ACTION_TYPE_FAILED_MAX_NUM_SOCKETS=Cannot ${action} ${type}. Max number of sockets exceeded VMT_CANNOT_IMPORT_TEMPLATE_EXISTS=Import Template failed - Template Id already exist in the system. Please remove the Template (${TemplateName}) from the system first +VMT_CANNOT_IMPORT_TEMPLATE_VERSION_MISSING_BASE=Cannot import Template Version, Base Template for this Version is missing, please first Import Baste Template, or Import Version as Base Template using Clone. VM_CANNOT_IMPORT_TEMPLATE_NAME_EXISTS=Import Template failed - Template Name already exist in the system. Please rename the Template in the system first VM_CANNOT_IMPORT_VM_EXISTS=Import VM failed - VM Id already exist in the system. Please remove the VM (${VmName}) from the system first VM_CANNOT_IMPORT_VM_NAME_EXISTS=Import VM failed - VM Name already exist in the system. Please rename the VM in the system first -- To view, visit http://gerrit.ovirt.org/25999 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9fbf2c45c03fe9838bf25be5529c93c322372b28 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Omer Frenkel <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
