Vered Volansky has uploaded a new change for review.

Change subject: core: Fix Moving Disk message (#856082)
......................................................................

core: Fix Moving Disk message (#856082)

Faulty error message when moving disk was corrected from "moveing" to
"moving". The original message used ${Action}ing.

Added to ImageOperation enum an action data member in the
progressive form (moving, copying), while the message now only
uses {$Action}, which is extracted from the ImageOperation enum (the newly
added action).

Change-Id: I53bb3238d1a5e6b3e966adf488a10946e252ffe3
Bug-Url: https://bugzilla.redhat.com/856082
Signed-off-by: Vered Volansky <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageOperation.java
M 
backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties
3 files changed, 19 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/03/9303/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
index a75d06a..390db22 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
@@ -462,7 +462,7 @@
             jobProperties = super.getJobMessageProperties();
             jobProperties.put("sourcesd", sourceSDName);
             jobProperties.put("targetsd", getStorageDomainName());
-            jobProperties.put("action", getParameters().getOperation().name());
+            jobProperties.put("action", 
getParameters().getOperation().getAction());
         }
         return jobProperties;
     }
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageOperation.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageOperation.java
index f5d5b20..07b88f0 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageOperation.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageOperation.java
@@ -2,8 +2,18 @@
 
 public enum ImageOperation {
     Unassigned,
-    Copy,
-    Move;
+    Copy("Copying"),
+    Move("Moving");
+
+    private String action;
+
+    private ImageOperation() {
+        this("");
+    }
+
+    private ImageOperation(String action) {
+        this.action = action;
+    }
 
     public int getValue() {
         return this.ordinal();
@@ -12,4 +22,9 @@
     public static ImageOperation forValue(int value) {
         return values()[value];
     }
+
+    public String getAction()
+    {
+        return action;
+    }
 }
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties
 
b/backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties
index e22f945..f50c31f 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/ExecutionMessages.properties
@@ -36,7 +36,7 @@
 job.AddVmTemplate=Creating VM Template ${VmTemplate} in Data Center 
${StoragePool}
 job.RemoveVmTemplate=Removing VM Template ${VmTemplate} from Data Center 
${StoragePool}
 job.MoveOrCopyTemplate=Moving VM Template ${VmTemplate}
-job.MoveOrCopyDisk=${Action}ing Disk from ${SourceSD} to ${TargetSD}
+job.MoveOrCopyDisk=${Action} Disk from ${SourceSD} to ${TargetSD}
 job.CreateAllSnapshotsFromVm=Creating VM Snapshot ${Snapshot} for VM ${VM}
 job.TryBackToAllSnapshotsOfVm=Preview VM Snapshot ${Snapshot} of VM ${VM}
 job.RestoreAllSnapshots=Restoring VM Snapshot ${Snapshot} of VM ${VM}


--
To view, visit http://gerrit.ovirt.org/9303
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53bb3238d1a5e6b3e966adf488a10946e252ffe3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to