BryanMLima commented on code in PR #6491:
URL: https://github.com/apache/cloudstack/pull/6491#discussion_r992566585
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java:
##########
@@ -195,4 +192,16 @@ public void execute() {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR,
e.getMessage());
}
}
+
+ private void setResponseBasedOnVmType(VirtualMachine userVm,
VirtualMachine migratedVm) {
+ if (VirtualMachine.Type.User.equals(userVm.getType())) {
+ UserVmResponse userVmResponse =
_responseGenerator.createUserVmResponse(ResponseView.Full, "virtualmachine",
(UserVm) migratedVm).get(0);
+ userVmResponse.setResponseName(getCommandName());
+ setResponseObject(userVmResponse);
+ return;
+ }
+ SystemVmResponse systemVmResponse =
_responseGenerator.createSystemVmResponse(migratedVm);
+ systemVmResponse.setResponseName(getCommandName());
+ setResponseObject(systemVmResponse);
Review Comment:
While testing in my local lab, I did not find any problems, but more testing
is always better.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]