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 2023/01/16 12:55:58 UTC

[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #6979: Guest os mappings improvements

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: commits-unsubscribe@cloudstack.apache.org

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