Lior Vernia has uploaded a new change for review. Change subject: engine: Add network name to "network used" error message ......................................................................
engine: Add network name to "network used" error message This to assist users to identify which networks were not created as part of a batch import operation. Change-Id: I238d57ac3ae943aed312f45a2e6b7b4978b8f95b Bug-Url: https://bugzilla.redhat.com/1048752 Signed-off-by: Lior Vernia <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.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 5 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/39/25839/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.java index 9eac8a1..969a324 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.java @@ -133,7 +133,8 @@ for (Network otherNetwork : getNetworks()) { if (otherNetwork.getName().equals(network.getName()) && !otherNetwork.getId().equals(network.getId())) { - return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE); + return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE, + String.format("$NetworkName %s", network.getName())); } } return ValidationResult.VALID; 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 f15b551..e656cd8 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -510,7 +510,7 @@ ERROR_CANNOT_REMOVE_POOL_WITH_ACTIVE_DOMAINS=Cannot remove Data Center which contains active/locked Storage Domains.\n\ -Please deactivate all domains and wait for tasks to finish before removing the Data Center. VDS_GROUP_CANNOT_CHANGE_STORAGE_POOL=Cannot change Data Center association when editing a Cluster. -ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE=Cannot ${action} ${type}. The logical network's name is already used by an existing logical network in the same data-center.\n\ +ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE=Cannot ${action} ${type}. The name of the logical network '${NetworkName}' is already used by an existing logical network in the same data-center.\n\ -Please choose a different name. ACTION_TYPE_FAILED_NETWORK_IN_USE=Cannot ${action} ${type}. Several ${entities} (${ENTITIES_USING_NETWORK_COUNTER}) are using this logical network:\n${ENTITIES_USING_NETWORK}\n - Please remove it from all ${entities} that are using it and try again. ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV=Volume Group (VGs) and Logical Volumes (LVs) are not specified. 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 b2ed4b2..f21daa0 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 @@ -1399,7 +1399,7 @@ @DefaultStringValue("Cannot change Data Center association when editing a Cluster.") String VDS_GROUP_CANNOT_CHANGE_STORAGE_POOL(); - @DefaultStringValue("Cannot ${action} ${type}. The logical network's name is already used by an existing logical network in the same data-center.\n-Please choose a different name.") + @DefaultStringValue("Cannot ${action} ${type}. The name of the logical network '${NetworkName}' is already used by an existing logical network in the same data-center.\n-Please choose a different name.") String ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE(); @DefaultStringValue("Cannot ${action} ${type}. Several ${entities} (${ENTITIES_USING_NETWORK_COUNTER}) are using this logical network:\n${ENTITIES_USING_NETWORK}\n - Please remove it from all ${entities} that are using it and try again.") 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 4205cfe..fc2a659 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 @@ -490,7 +490,7 @@ ERROR_CANNOT_REMOVE_POOL_WITH_ACTIVE_DOMAINS=Cannot remove Data Center which contains active/locked Storage Domains.\n\ -Please deactivate all domains and wait for tasks to finish before removing the Data Center. VDS_GROUP_CANNOT_CHANGE_STORAGE_POOL=Cannot change Data Center association when editing a Cluster. -ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE=Cannot ${action} ${type}. The logical network's name is already used by an existing logical network in the same data-center.\n\ +ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE=Cannot ${action} ${type}. The name of the logical network '${NetworkName}' is already used by an existing logical network in the same data-center.\n\ -Please choose a different name. ACTION_TYPE_FAILED_NETWORK_IN_USE=Cannot ${action} ${type}. Several ${entities} (${ENTITIES_USING_NETWORK_COUNTER}) are using this logical network:\n${ENTITIES_USING_NETWORK}\n - Please remove it from all ${entities} that are using it and try again. ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV=Volume Group (VGs) and Logical Volumes (LVs) are not specified. 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 5427b22..d4ba993 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 @@ -515,7 +515,7 @@ ERROR_CANNOT_REMOVE_POOL_WITH_ACTIVE_DOMAINS=Cannot remove Data Center which contains active/locked Storage Domains.\n\ -Please deactivate all domains and wait for tasks to finish before removing the Data Center. VDS_GROUP_CANNOT_CHANGE_STORAGE_POOL=Cannot change Data Center association when editing a Cluster. -ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE=Cannot ${action} ${type}. The logical network's name is already used by an existing logical network in the same data-center.\n\ +ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE=Cannot ${action} ${type}. The name of the logical network '${NetworkName}' is already used by an existing logical network in the same data-center.\n\ -Please choose a different name. ACTION_TYPE_FAILED_NETWORK_IN_USE=Cannot ${action} ${type}. Several ${entities} (${ENTITIES_USING_NETWORK_COUNTER}) are using this logical network:\n${ENTITIES_USING_NETWORK}\n - Please remove it from all ${entities} that are using it and try again. ERROR_CANNOT_CREATE_STORAGE_DOMAIN_WITHOUT_VG_LV=Volume Group (VGs) and Logical Volumes (LVs) are not specified. -- To view, visit http://gerrit.ovirt.org/25839 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I238d57ac3ae943aed312f45a2e6b7b4978b8f95b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Lior Vernia <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
