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 <masa...@redhat.com>
---
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/42/25342/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..0d84d11 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
@@ -66,7 +66,7 @@
         }
 
         if (!ValidationUtils.validateInputs(getValidationGroups(), 
getNic()).isEmpty()) {
-            return 
failCanDoAction(VdcBllMessages.IMPROPER_INTERFACE_IS_LABELED);
+            return failCanDoAction(VdcBllMessages.IMPROPER_BOND_IS_LABELED);
         }
 
         if (Boolean.TRUE.equals(getNic().getBonded())) {
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 6562204..76d4064 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
@@ -500,6 +500,7 @@
     
ACTION_TYPE_FAILED_CANNOT_REMOVE_LABELED_NETWORK_FROM_NIC(ErrorType.CONFLICT),
     
ACTION_TYPE_FAILED_CANNOT_CONFIGURE_DISPLAY_NETWORK_WITHOUT_BOOT_PROTOCOL(ErrorType.BAD_PARAMETERS),
     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 ebaec8b..514bc71 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/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 DAlabels 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 32f53b2..0d166ba 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
@@ -1960,9 +1960,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 DAlabels 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 3bf59b6..7d7b533 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
@@ -699,7 +699,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 DAlabels 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 430e5d3..d48baba 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
@@ -720,7 +720,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 DAlabels 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/25342
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I250c56d0f6a70dbe8da89a3aa5b28592f9a0a995
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <masa...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to