Moti Asayag has uploaded a new change for review. Change subject: engine: Improve cannot label bond message ......................................................................
engine: Improve cannot label bond message Change-Id: I250c56d0f6a70dbe8da89a3aa5b28592f9a0a995 Bug-Url: https://bugzilla.redhat.com/1054187 Signed-off-by: Moti Asayag <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/LabelNicCommand.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, 12 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/26/25526/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/LabelNicCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/LabelNicCommand.java index e2f1e22..ad13467 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/LabelNicCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/LabelNicCommand.java @@ -81,7 +81,7 @@ } if (slavesCount < 2) { - return failCanDoAction(VdcBllMessages.IMPROPER_INTERFACE_IS_LABELED); + return failCanDoAction(VdcBllMessages.IMPROPER_BOND_IS_LABELED); } } 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 9f85ca3..310e13d 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 @@ -499,6 +499,7 @@ NETWORK_LABEL_FORMAT_INVALID(ErrorType.BAD_PARAMETERS), ACTION_TYPE_FAILED_CANNOT_REMOVE_LABELED_NETWORK_FROM_NIC(ErrorType.CONFLICT), IMPROPER_INTERFACE_IS_LABELED(ErrorType.BAD_PARAMETERS), + IMPROPER_BOND_IS_LABELED(ErrorType.BAD_PARAMETERS), INTERFACE_ALREADY_LABELED(ErrorType.CONFLICT), INTERFACE_NOT_LABELED(ErrorType.CONFLICT), LABELED_NETWORK_ATTACHED_TO_WRONG_INTERFACE(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 6349ffd..d9fce66 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -718,7 +718,8 @@ VDS_GROUP_CANNOT_DISABLE_GLUSTER_WHEN_CLUSTER_CONTAINS_VOLUMES=Cannot disable gluster service on the cluster as it contains volumes. NETWORK_ATTACH_ILLEGAL_GATEWAY=The default gateway should be set only on the Management Network SLAVE_INTERFACE_IS_MISCONFIGURED=A slave interface is not properly configured. Please verify slaves do not contain any of the following properties: network name, boot protocol, IP address, netmask, gateway or vlan-ID notation (as part of interface's name or explicitly). -IMPROPER_INTERFACE_IS_LABELED=An improper network interface is labeled. Please verify labels are provided only to interfaces or to bonds (not to slaves nor vlans). +IMPROPER_INTERFACE_IS_LABELED=Cannot ${action} ${type}. An improper network interface is labeled. Please verify labels are provided only to interfaces or to bonds (not to slaves nor vlans). +IMPROPER_BOND_IS_LABELED=Cannot ${action} ${type}. An improper bond is labeled. Please verify labels are provided only to bonds with at least two slaves. INTERFACE_ALREADY_LABELED=Cannot ${action} ${type}. The network interface is already labeled with the specified label. INTERFACE_NOT_LABELED=Cannot ${action} ${type}. The network interface is not labeled with the specified label. MISSING_DIRECTORY_ELEMENT_ID=User/group ID cannot be empty. 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 bc2aa81..15e9ce8 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 @@ -1957,9 +1957,12 @@ @DefaultStringValue("A slave interface is not properly configured. Please verify slaves do not contain any of the following properties: network name, boot protocol, IP address, netmask, gateway or vlan-ID notation (as part of interface's name or explicitly).") String SLAVE_INTERFACE_IS_MISCONFIGURED(); - @DefaultStringValue("An improper network interface is labeled. Please verify labels are provided only to interfaces or to bonds (not to slaves nor vlans).") + @DefaultStringValue("Cannot ${action} ${type}. An improper network interface is labeled. Please verify labels are provided only to interfaces or to bonds (not to slaves nor vlans).") String IMPROPER_INTERFACE_IS_LABELED(); + @DefaultStringValue("Cannot ${action} ${type}. An improper bond is labeled. Please verify labels are provided only to bonds with at least two slaves.") + String IMPROPER_BOND_IS_LABELED(); + @DefaultStringValue("Cannot ${action} ${type}. The network interface is already labeled with the specified label.") String INTERFACE_ALREADY_LABELED(); 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 32144c6..f9b8ab2 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 @@ -698,7 +698,8 @@ VDS_GROUP_CANNOT_DISABLE_GLUSTER_WHEN_CLUSTER_CONTAINS_VOLUMES=Cannot disable gluster service on the cluster as it contains volumes. NETWORK_ATTACH_ILLEGAL_GATEWAY=The default gateway should be set only on the Management Network SLAVE_INTERFACE_IS_MISCONFIGURED=A slave interface is not properly configured. Please verify slaves do not contain any of the following properties: network name, boot protocol, IP address, netmask, gateway or vlan-ID notation (as part of interface's name or explicitly). -IMPROPER_INTERFACE_IS_LABELED=An improper network interface is labeled. Please verify labels are provided only to interfaces or to bonds (not to slaves nor vlans). +IMPROPER_INTERFACE_IS_LABELED=Cannot ${action} ${type}. An improper network interface is labeled. Please verify labels are provided only to interfaces or to bonds (not to slaves nor vlans). +IMPROPER_BOND_IS_LABELED=Cannot ${action} ${type}. An improper bond is labeled. Please verify labels are provided only to bonds with at least two slaves. INTERFACE_ALREADY_LABELED=Cannot ${action} ${type}. The network interface is already labeled with the specified label. INTERFACE_NOT_LABELED=Cannot ${action} ${type}. The network interface is not labeled with the specified label. MISSING_DIRECTORY_ELEMENT_ID=User/group ID cannot be empty. 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 cfde6e6..49cda7a 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 @@ -719,7 +719,8 @@ VDS_GROUP_CANNOT_DISABLE_GLUSTER_WHEN_CLUSTER_CONTAINS_VOLUMES=Cannot disable gluster service on the cluster as it contains volumes. NETWORK_ATTACH_ILLEGAL_GATEWAY=The default gateway should be set only on the Management Network SLAVE_INTERFACE_IS_MISCONFIGURED=A slave interface is not properly configured. Please verify slaves do not contain any of the following properties: network name, boot protocol, IP address, netmask, gateway or vlan-ID notation (as part of interface's name or explicitly). -IMPROPER_INTERFACE_IS_LABELED=An improper network interface is labeled. Please verify labels are provided only to interfaces or to bonds (not to slaves nor vlans). +IMPROPER_INTERFACE_IS_LABELED=Cannot ${action} ${type}. An improper network interface is labeled. Please verify labels are provided only to interfaces or to bonds (not to slaves nor vlans). +IMPROPER_BOND_IS_LABELED=Cannot ${action} ${type}. An improper bond is labeled. Please verify labels are provided only to bonds with at least two slaves. INTERFACE_ALREADY_LABELED=Cannot ${action} ${type}. The network interface is already labeled with the specified label. INTERFACE_NOT_LABELED=Cannot ${action} ${type}. The network interface is not labeled with the specified label. MISSING_DIRECTORY_ELEMENT_ID=User/group ID cannot be empty. -- To view, visit http://gerrit.ovirt.org/25526 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I250c56d0f6a70dbe8da89a3aa5b28592f9a0a995 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Moti Asayag <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
