You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/01/14 20:31:52 UTC
[GitHub] mike-tutkowski commented on a change in pull request #2848: Vmware
offline migration
mike-tutkowski commented on a change in pull request #2848: Vmware offline migration
URL: https://github.com/apache/cloudstack/pull/2848#discussion_r247647511
##########
File path: api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java
##########
@@ -119,13 +119,7 @@ public String getEventType() {
@Override
public String getEventDescription() {
- if (getHostId() != null) {
- return "Attempting to migrate VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()) + " to host Id: " + this._uuidMgr.getUuid(Host.class, getHostId());
- } else if (getStoragePoolId() != null) {
- return "Attempting to migrate VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()) + " to storage pool Id: " + this._uuidMgr.getUuid(StoragePool.class, getStoragePoolId());
- } else {
- return "Attempting to migrate VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId());
- }
+ return "Attempting to migrate VM Id: " + getVirtualMachineId() + " to host Id: " + getHostId();
Review comment:
Thanks, @nvazquez! Do you know why we then removed the if/else branching in favor of just one string? Will getHostId() always be non null?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services