DaanHoogland commented on code in PR #6979:
URL: https://github.com/apache/cloudstack/pull/6979#discussion_r1071210829


##########
engine/schema/src/main/java/com/cloud/upgrade/GuestOsMapper.java:
##########
@@ -188,4 +190,33 @@ private boolean 
isValidGuestOSHypervisorMapping(GuestOSHypervisorMapping mapping
         LOG.warn("Invalid Guest OS hypervisor mapping");
         return false;
     }
+
+    /**
+     * Copies guest OS mappings from src version to dest version for the 
hypervisor (use this to copy all mappings from older version to newer version 
during upgrade)
+     * @return true if copied successfully, else false.
+     */
+    public boolean copyGuestOSHypervisorMappings(HypervisorType 
hypervisorType, String srcVersion, String destVersion) {
+        if (hypervisorType == HypervisorType.None || hypervisorType == 
HypervisorType.Any) {
+            LOG.warn("Unable to copy, invalid hypervisor");
+            return false;
+        }
+
+        if (StringUtils.isBlank(srcVersion) || 
StringUtils.isBlank(destVersion)) {

Review Comment:
   @harikrishna-patnala why not apply this?



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

Reply via email to