harikrishna-patnala commented on code in PR #8426: URL: https://github.com/apache/cloudstack/pull/8426#discussion_r1439386526
########## engine/schema/src/main/java/com/cloud/storage/dao/GuestOSHypervisorDaoImpl.java: ########## @@ -100,6 +103,21 @@ public GuestOSHypervisorVO findByOsIdAndHypervisor(long guestOsId, String hyperv return findOneBy(sc); } + @Override + public GuestOSHypervisorVO findByOsIdAndHypervisor(long guestOsId, String hypervisorType, String hypervisorVersion) { + GuestOSHypervisorVO mapping = findByOsIdAndHypervisorInternal(guestOsId, hypervisorType, hypervisorVersion); + if (mapping != null || !Hypervisor.HypervisorType.VMware.toString().equals(hypervisorType)) { + return mapping; + } + String parentVersion = CloudStackVersion.getVMwareParentVersion(hypervisorVersion); + if (parentVersion == null) { + return null; Review Comment: Can we have a log message here stating that the parent is not found, so returning null. ########## engine/schema/src/main/java/com/cloud/storage/dao/GuestOSHypervisorDaoImpl.java: ########## @@ -138,6 +155,21 @@ public GuestOSHypervisorVO findByOsNameAndHypervisor(String guestOsName, String return CollectionUtils.isNotEmpty(results) ? results.get(0) : null; } + @Override + public GuestOSHypervisorVO findByOsNameAndHypervisor(String guestOsName, String hypervisorType, String hypervisorVersion) { + GuestOSHypervisorVO mapping = findByOsNameAndHypervisorInternal(guestOsName, hypervisorType, hypervisorVersion); + if (mapping != null || !Hypervisor.HypervisorType.VMware.toString().equals(hypervisorType)) { + return mapping; + } + String parentVersion = CloudStackVersion.getVMwareParentVersion(hypervisorVersion); + if (parentVersion == null) { + return null; Review Comment: same here please, some log message -- 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