DaanHoogland commented on code in PR #10454: URL: https://github.com/apache/cloudstack/pull/10454#discussion_r2203908774
########## plugins/hypervisors/vmware/src/main/java/com/cloud/storage/resource/VmwareStorageProcessor.java: ########## @@ -2101,18 +2101,11 @@ private Answer attachVolume(Command cmd, DiskTO disk, boolean isAttach, boolean AttachAnswer answer = new AttachAnswer(disk); if (isAttach) { - String rootDiskControllerDetail = DiskControllerType.ide.toString(); - if (controllerInfo != null && StringUtils.isNotEmpty(controllerInfo.get(VmDetailConstants.ROOT_DISK_CONTROLLER))) { - rootDiskControllerDetail = controllerInfo.get(VmDetailConstants.ROOT_DISK_CONTROLLER); - } - String dataDiskControllerDetail = getLegacyVmDataDiskController(); - if (controllerInfo != null && StringUtils.isNotEmpty(controllerInfo.get(VmDetailConstants.DATA_DISK_CONTROLLER))) { - dataDiskControllerDetail = controllerInfo.get(VmDetailConstants.DATA_DISK_CONTROLLER); - } - - VmwareHelper.validateDiskControllerDetails(rootDiskControllerDetail, dataDiskControllerDetail); - Pair<String, String> chosenDiskControllers = VmwareHelper.chooseRequiredDiskControllers(new Pair<>(rootDiskControllerDetail, dataDiskControllerDetail), vmMo, null, null); - String diskController = VmwareHelper.getControllerBasedOnDiskType(chosenDiskControllers, disk); + String rootDiskControllerDetail = controllerInfo.get(VmDetailConstants.ROOT_DISK_CONTROLLER); + String dataDiskControllerDetail = controllerInfo.get(VmDetailConstants.DATA_DISK_CONTROLLER); Review Comment: I appreciate that you refuse this @winterhazel and trust your judgement, but I think a comment in the code and preferably an extraction of the related code into a new method to explain why would be nice (no -1) -- 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org