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/09 16:22:05 UTC

[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #6561: Guest OS hypervisor mapping improvements

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


##########
server/src/main/java/com/cloud/server/ManagementServerImpl.java:
##########
@@ -2831,6 +2894,14 @@ public GuestOSHypervisor updateGuestOsMapping(final UpdateGuestOsMappingCmd cmd)
             throw new InvalidParameterValueException("Unable to modify system defined Guest OS mapping");
         }
 
+        if (cmd.getOsMappingCheckEnabled()) {
+            GuestOS guestOs = ApiDBUtils.findGuestOSById(guestOsHypervisorHandle.getGuestOsId());
+            if (guestOs == null) {
+                throw new InvalidParameterValueException("Unable to find the guest OS for the mapping");
+            }
+            checkGuestOSHypervisorMapping(HypervisorType.getType(guestOsHypervisorHandle.getHypervisorType()), guestOsHypervisorHandle.getHypervisorVersion(), guestOs.getDisplayName(), osNameForHypervisor);
+        }

Review Comment:
   extra method



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