Idan Shaby has uploaded a new change for review.

Change subject: core: Add disk alias to "Scan Alignment" error message
......................................................................

core: Add disk alias to "Scan Alignment" error message

When running "Scan Alignment" on a disk based on block storage, the
error message that is showing up doesn't contain the disk's alias like
error messages for other failure reasons of the command.
This patch adds this error message the disk's alias.

Change-Id: Ibfc66dd3b7264ff7b8e5136c7e7d5694e3f501df
Bug-Url: https://bugzilla.redhat.com/1142781
Signed-off-by: Idan Shaby <ish...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetDiskAlignmentCommand.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/83/42483/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetDiskAlignmentCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetDiskAlignmentCommand.java
index 15f5bf9..1af2cc8 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetDiskAlignmentCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetDiskAlignmentCommand.java
@@ -119,6 +119,7 @@
 
             StorageDomainStatic sds = 
getStorageDomainStaticDAO().get(((DiskImage) getDisk()).getStorageIds().get(0));
             if (!sds.getStorageType().isBlockDomain()) {
+                addCanDoActionMessageVariable("diskAlias", getDiskAlias());
                 return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_ALIGNMENT_SCAN_STORAGE_TYPE);
             }
         }
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 951b726..854373c 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -1347,7 +1347,7 @@
 
 # Alignment scan
 ERROR_CANNOT_RUN_ALIGNMENT_SCAN_VM_IS_RUNNING=Cannot ${action} ${type}. 
Alignment scan of a disk attached to a running VM is only supported with RAW 
virtual disks.
-ACTION_TYPE_FAILED_ALIGNMENT_SCAN_STORAGE_TYPE=Cannot ${action} ${type}. 
Alignment scan is only supported for disks located on block storage domains.
+ACTION_TYPE_FAILED_ALIGNMENT_SCAN_STORAGE_TYPE=Cannot ${action} ${type} 
${diskAlias}. Alignment scan is only supported for disks located on block 
storage domains.
 
 SCHEDULING_ALL_HOSTS_FILTERED_OUT=Cannot ${action} ${type}. There is no host 
that satisfies current scheduling constraints. See below for details:
 SCHEDULING_HOST_FILTERED_REASON=The host ${hostName} did not satisfy 
${filterType} filter ${filterName}.
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 df70ded..1d80283 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
@@ -3581,7 +3581,7 @@
     @DefaultStringValue("Cannot ${action} ${type}. Alignment scan of a disk 
attached to a running VM is only supported with RAW virtual disks.")
     String ERROR_CANNOT_RUN_ALIGNMENT_SCAN_VM_IS_RUNNING();
 
-    @DefaultStringValue("Cannot ${action} ${type}. Alignment scan is only 
supported for disks located on block storage domains.")
+    @DefaultStringValue("Cannot ${action} ${type} ${diskAlias}. Alignment scan 
is only supported for disks located on block storage domains.")
     String ACTION_TYPE_FAILED_ALIGNMENT_SCAN_STORAGE_TYPE();
 
     @DefaultStringValue("Cannot ${action} ${type}. Invalid time zone for given 
OS type.")
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 b0847c6..1be931e 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
@@ -1030,7 +1030,7 @@
 
 # Alignment scan
 ERROR_CANNOT_RUN_ALIGNMENT_SCAN_VM_IS_RUNNING=Cannot ${action} ${type}. 
Alignment scan of a disk attached to a running VM is only supported with RAW 
virtual disks.
-ACTION_TYPE_FAILED_ALIGNMENT_SCAN_STORAGE_TYPE=Cannot ${action} ${type}. 
Alignment scan is only supported for disks located on block storage domains.
+ACTION_TYPE_FAILED_ALIGNMENT_SCAN_STORAGE_TYPE=Cannot ${action} ${type} 
${diskAlias}. Alignment scan is only supported for disks located on block 
storage domains.
 
 SCHEDULING_ALL_HOSTS_FILTERED_OUT=Cannot ${action} ${type}. There is no host 
that satisfies current scheduling constraints. See below for details:
 SCHEDULING_HOST_FILTERED_REASON=The host ${hostName} did not satisfy 
${filterType} filter ${filterName}.
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 4fc65c5..294a583 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
@@ -1293,7 +1293,7 @@
 
 # Alignment scan
 ERROR_CANNOT_RUN_ALIGNMENT_SCAN_VM_IS_RUNNING=Cannot ${action} ${type}. 
Alignment scan of a disk attached to a running VM is only supported with RAW 
virtual disks.
-ACTION_TYPE_FAILED_ALIGNMENT_SCAN_STORAGE_TYPE=Cannot ${action} ${type}. 
Alignment scan is only supported for disks located on block storage domains.
+ACTION_TYPE_FAILED_ALIGNMENT_SCAN_STORAGE_TYPE=Cannot ${action} ${type} 
${diskAlias}. Alignment scan is only supported for disks located on block 
storage domains.
 
 SCHEDULING_ALL_HOSTS_FILTERED_OUT=Cannot ${action} ${type}. There is no host 
that satisfies current scheduling constraints. See below for details:
 SCHEDULING_HOST_FILTERED_REASON=The host ${hostName} did not satisfy 
${filterType} filter ${filterName}.


-- 
To view, visit https://gerrit.ovirt.org/42483
To unsubscribe, visit https://gerrit.ovirt.org/settings

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

Reply via email to