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 2021/02/12 07:14:18 UTC

[GitHub] [cloudstack] rhtyd commented on a change in pull request #4604: api: add zone, vm name params in listVmSnapshot response

rhtyd commented on a change in pull request #4604:
URL: https://github.com/apache/cloudstack/pull/4604#discussion_r575026036



##########
File path: server/src/main/java/com/cloud/api/ApiResponseHelper.java
##########
@@ -621,11 +622,14 @@ public VMSnapshotResponse createVMSnapshotResponse(VMSnapshot vmSnapshot) {
         vmSnapshotResponse.setDisplayName(vmSnapshot.getDisplayName());
         UserVm vm = ApiDBUtils.findUserVmById(vmSnapshot.getVmId());
         if (vm != null) {
-            vmSnapshotResponse.setVirtualMachineid(vm.getUuid());
+            vmSnapshotResponse.setVirtualMachineId(vm.getUuid());
+            vmSnapshotResponse.setVirtualMachineName(Strings.isNullOrEmpty(vm.getDisplayName()) ? vm.getHostName() : vm.getDisplayName());
+            vmSnapshotResponse.setVirtualMachineName(vm.getHostName());

Review comment:
       Why is setVirtualMachineName() added twice @shwstppr ?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org