Moti Asayag has uploaded a new change for review. Change subject: engine: Add network name to detach error message (#824497) ......................................................................
engine: Add network name to detach error message (#824497) https://bugzilla.redhat.com/824497 The network name is being added to the error message popped when a network detach command is failed. This change has less meaning for 3.0 cluster on which the action is performed for a single network. However, since wishes to reuse same error message for SetupNetworks command, this information is being supplemented. Change-Id: I336bfe134c9a27f4aa4fea9c28531f52515e3651 Signed-off-by: Moti Asayag <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachNetworkFromVdsInterfaceCommand.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, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/7517/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachNetworkFromVdsInterfaceCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachNetworkFromVdsInterfaceCommand.java index 6a05e01..b0ea9ac 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachNetworkFromVdsInterfaceCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachNetworkFromVdsInterfaceCommand.java @@ -152,6 +152,7 @@ if (!vmNames.isEmpty()) { addCanDoActionMessage(VdcBllMessages.NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS); + addCanDoActionMessage(String.format("$Network %1$s", getParameters().getNetwork().getname())); addCanDoActionMessage(String.format("$VmNames %1$s", StringUtils.join(vmNames, ","))); return false; } 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 376aef7..62d6dfb 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -429,7 +429,7 @@ NETWORK_INTERFACES_DONT_EXIST=Cannot ${action} ${type}. The following Network Interfaces don't exist on the Host: ${NETWORK_INTERFACES_DONT_EXIST_LIST}. NETWORKS_DONT_EXIST_IN_CLUSTER=Cannot ${action} ${type}. The following Logical Networks don't exist in the Host's Cluster: ${NETWORKS_DONT_EXIST_IN_CLUSTER_LIST}. NETWORK_BONDS_INVALID_SLAVE_COUNT=Cannot ${action} ${type}. The following Bonds consist of less than two Network Interfaces: ${NETWORK_BONDS_INVALID_SLAVE_COUNT_LIST}. -NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS=Cannot ${action} ${type}. The following VMs are actively using the Logical Network: ${VmNames}. Please stop the VMs and try again. +NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS=Cannot ${action} ${type}. The Logical Network ${Network} is being actively used by the following VMs: ${VmNames}. Please stop the VMs and try again. NON_VM_NETWORK_CANNOT_SUPPORT_STP=Cannot ${action} ${type}. STP can only be enabled on VM Networks. MORE_THAN_ONE_NETWORK_ATTACHED=More than one Logical Network are attached to the Network Interfaces. Please detach all the Logical Networks except one and try again. CANNOT_PREIEW_CURRENT_IMAGE=The currently used VM Snapshot Image cannot be used in Preview command. 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 291a2a0..f3e2420 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 @@ -1126,7 +1126,7 @@ @DefaultStringValue("Cannot ${action} ${type}. The following Bonds consist of less than two Network Interfaces: ${NETWORK_BONDS_INVALID_SLAVE_COUNT_LIST}.") String NETWORK_BONDS_INVALID_SLAVE_COUNT(); - @DefaultStringValue("Cannot ${action} ${type}. The following VMs are actively using the Logical Network: ${VmNames}. Please stop the VMs and try again.") + @DefaultStringValue("Cannot ${action} ${type}. The Logical Network ${Network} is being actively used by the following VMs: ${VmNames}. Please stop the VMs and try again.") String NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS(); @DefaultStringValue("Cannot ${action} ${type}. STP can only be enabled on VM Networks.") 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 41e92b0..e3c99aa 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 @@ -427,7 +427,7 @@ NETWORK_INTERFACES_DONT_EXIST=Cannot ${action} ${type}. The following Network Interfaces don't exist on the Host: ${NETWORK_INTERFACES_DONT_EXIST_LIST}. NETWORKS_DONT_EXIST_IN_CLUSTER=Cannot ${action} ${type}. The following Logical Networks don't exist in the Host's Cluster: ${NETWORKS_DONT_EXIST_IN_CLUSTER_LIST}. NETWORK_BONDS_INVALID_SLAVE_COUNT=Cannot ${action} ${type}. The following Bonds consist of less than two Network Interfaces: ${NETWORK_BONDS_INVALID_SLAVE_COUNT_LIST}. -NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS=Cannot ${action} ${type}. The following VMs are actively using the Logical Network: ${VmNames}. Please stop the VMs and try again. +NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS=Cannot ${action} ${type}. The Logical Network ${Network} is being actively used by the following VMs: ${VmNames}. Please stop the VMs and try again. NON_VM_NETWORK_CANNOT_SUPPORT_STP=Cannot ${action} ${type}. STP can only be enabled on VM Networks. MORE_THAN_ONE_NETWORK_ATTACHED=More than one Logical Network are attached to the Network Interfaces. Please detach all the Logical Networks except one and try again. CANNOT_PREIEW_CURRENT_IMAGE=The currently used VM Snapshot Image cannot be used in Preview command. 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 0537ffb..b2f1154 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 @@ -425,7 +425,7 @@ NETWORK_INTERFACES_DONT_EXIST=Cannot ${action} ${type}. The following Network Interfaces don't exist on the Host: ${NETWORK_INTERFACES_DONT_EXIST_LIST}. NETWORKS_DONT_EXIST_IN_CLUSTER=Cannot ${action} ${type}. The following Logical Networks don't exist in the Host's Cluster: ${NETWORKS_DONT_EXIST_IN_CLUSTER_LIST}. NETWORK_BONDS_INVALID_SLAVE_COUNT=Cannot ${action} ${type}. The following Bonds consist of less than two Network Interfaces: ${NETWORK_BONDS_INVALID_SLAVE_COUNT_LIST}. -NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS=Cannot ${action} ${type}. The following VMs are actively using the Logical Network: ${VmNames}. Please stop the VMs and try again. +NETWORK_CANNOT_DETACH_NETWORK_USED_BY_VMS=Cannot ${action} ${type}. The Logical Network ${Network} is being actively used by the following VMs: ${VmNames}. Please stop the VMs and try again. NON_VM_NETWORK_CANNOT_SUPPORT_STP=Cannot ${action} ${type}. STP can only be enabled on VM Networks. MORE_THAN_ONE_NETWORK_ATTACHED=More than one Logical Network are attached to the Network Interfaces. Please detach all the Logical Networks except one and try again. CANNOT_PREIEW_CURRENT_IMAGE=The currently used VM Snapshot Image cannot be used in Preview command. -- To view, visit http://gerrit.ovirt.org/7517 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I336bfe134c9a27f4aa4fea9c28531f52515e3651 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
