Sergey Gotliv has uploaded a new change for review.
Change subject: engine: Populate error message placeholder in
HotPlugDiskToVmCommand
......................................................................
engine: Populate error message placeholder in HotPlugDiskToVmCommand
Trying to deactivate locked disk will throw the error with
{diskAliases} placeholder which now is populated with the actual disk
alias.
Change-Id: Iff5224477b8ba547ea7dcde9069ec8874fa8ed24
Bug-Url: https://bugzilla.redhat.com/1031386
Signed-off-by: Sergey Gotliv <[email protected]>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/00/21800/1
diff --git
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
index 1d41751..56b1799 100644
---
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
+++
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
@@ -37,6 +37,10 @@
protected void setActionMessageParameters() {
addCanDoActionMessage(VdcBllMessages.VAR__ACTION__HOT_PLUG);
addCanDoActionMessage(VdcBllMessages.VAR__TYPE__VM_DISK);
+
+ if (getDiskAlias() != null) {
+ addCanDoActionMessage(String.format("$%1$s %2$s", "diskAliases",
getDiskAlias()));
+ }
}
@Override
@@ -177,7 +181,7 @@
@Override
public String getDiskAlias() {
- return disk.getDiskAlias();
+ return getDisk().getDiskAlias();
}
protected Disk getDisk() {
--
To view, visit http://gerrit.ovirt.org/21800
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff5224477b8ba547ea7dcde9069ec8874fa8ed24
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches